cat test.txt
1test1
2test2
2test

cat test.txt | grep -o -e '1..'
1te

cat test.txt | grep -o -e '1....'
1test

# ^Begin $End
cat test.txt | grep -o -e '^2....2$'
2test2

cat test.txt | grep -o -e '^2....'
2test
2test

cat test.txt | grep -o -e '[0-9][a-zA-Z]*1'
1test1

cat test.txt | grep -o -e '[0-9][a-zA-Z]*2'
2test2

echo "test@test.com test@test.net" | grep -o -E '[a-zA-Z]+@[a-zA-Z]+\.com'
test@test.com

cat test.txt
IRR Valid
211.125.64.0/21 	
Japan
IRR Valid
211.125.72.0/21 
cat test.txt | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'

# daha doğru sonuç veriyor
cat test.txt | sort -u

# rakamsal olarak takılıyor bu nedenle tekil olanları bile silebiliyor normale göre daha az dengeli
cat test.txt | sort | uniq -u

86 Comments

Leave a Reply

Avatar placeholder