Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

awk for loop

cat file.txt | awk '{ for(i=1; i<=8 ; i++) print $i}'

file.txt :
AAA BBB CCC DDD

output : 
AAA
BBB
CCC
DDD
 
PREVIOUS NEXT
Tagged: #awk #loop
ADD COMMENT
Topic
Name
4+1 =