I would like need a suggestion on bash shell : Read a file line by line and do stuff
At first, give my best wish for all MOD and admins here. I"m learning bash shell program just for a month, not too much, not too little, but i must admire that i'm very bad at math and algorithm.
I want to do this : Read the content of a file line by line and at each line, ask me want to read next line or not, if not, press N - end, if yes, press Y - read next line For example : Code:
I love linux verymuch. I want to learn it |
while read line
do echo $line echo "read next line?" read a [ "$a" = "N" ] && break done <filename |
All times are GMT -5. The time now is 10:56 PM. |