Bash: using cat within for loop -
the following cat command seems work fine outside loop when place inside of gives syntax error:
for in 1 2 3 4 5 cat file_$i | grep "random text" | cut -d':' -f2 > temp_$i done
could explain me correct way write this? thank you
your for
loop should have semicolon:
for in 1 2 3 4 5;
Comments
Post a Comment