bash - Printing numbers from one list, not found in another -


my first list contains:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .... 

list x contains:

5 10 15 20 ... 

i want print numbers in first list not found in list x, i.e:

1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 .....  #!/bin/bash   in $(seq 0  5 100) echo $i done 

i want print number not contain #for in $(seq 0 5 100)

it's not clear if have actual lists, or tying generate list not contain multiples of 5. if it's latter,

#!/bin/bash in {0..100};   (( $i % 5 != 0 )) && echo "$i" done       

where % equivalent mod.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -