Shell Single Line For Loop Syntax

[Solved] Shell Single Line For Loop Syntax | Perl - Code Explorer | yomemimo.com
Question : bash for loop one line

Answered by : charlesalexandre-roy

# Basic syntax:
for i in a b; do echo $i; done

Source : https://www.cyberciti.biz/faq/linux-unix-bash-for-loop-one-line-command/ | Last Update : Tue, 22 Feb 22

Question : bash single line loop

Answered by : stephen-h

while true; do foo; sleep 2; done

Source : https://stackoverflow.com/questions/1289026/syntax-for-a-single-line-bash-infinite-while-loop | Last Update : Fri, 05 Jun 20

Question : shell one line for loop

Answered by : dull-dotterel-2nwno9twd1oy

for i in *; do echo $i; done

Source : https://www.cyberciti.biz/faq/linux-unix-bash-for-loop-one-line-command/ | Last Update : Tue, 28 Sep 21

Answers related to shell single line for loop syntax

Code Explorer Popular Question For Perl