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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -