Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- grep.txt
- Hello, how are you
- I am grep
- Nice to meet you
- Comment[zh_CN]=Zarfy Multiple Screens # want this line
- whateverComment[zh_CN]=Zarfy Multiple Screens # and not this one
- grep.sh
- #!/bin/sh
- code='[zh_CN]';
- grep "^Comment${code}*" grep.txt # both give me 2 lines
- grep -F "Comment$code" | grep '^Comment' grep.txt # both give me 2 lines
Add Comment
Please, Sign In to add comment