Sunday, November 14, 2021

advanced linux operations

1)  a_prefixes.csv | grep ,dev, | egrep ^100 | grep /2 | sed 's/,.*//' >  a_prefix.txt

2)  for I in $(cat b_prefixes.txt); do  grep -s $I a_prefix.txt || echo $I ; done > delete_prefix.txt | wc -l

3)  for I in $(cat b_prefixes.txt); do  grep -s $I a_prefix.txt && echo $I ; done > delete_prefixes.txt

4)  od -c b_prefixes.txt

5) grep -q 100.**.**.0/22 b_prefixes.txt

6) for I in $(cat b_prefixes.txt); do  grep -q $I a_prefix.txt || echo $I ; done > delete_prefixes.txt


No comments:

Post a Comment