Skipping a line and reading another line in shell script while loop
Posted
by
parameswar
on Stack Overflow
See other posts from Stack Overflow
or by parameswar
Published on 2012-04-13T11:23:49Z
Indexed on
2012/04/13
11:30 UTC
Read the original article
Hit count: 201
i have a code which reads a file line by line using a while loop. Inside the while loop, i have certain conditions. Is there a way using which i can skip the current line and read the next line based upon the condition ? Let me be precise:
while read Line
do
//some sample conditions
a=$Line
if [ "a" == "b" ]
//i want to go to the next line from this point.
done < **inputfile**
Any help would be appreciated.
© Stack Overflow or respective owner