Shell Scripting Loops - miraj/tools GitHub Wiki
How does echo * works? what is passed to echo command as arguments? one argument : *? or something else?
Why does is space needed after [ and [ [ operator? Is [ an operator or a command? Space is used to separate arguments from commands.
for name in ram shyam sam john do echo -n $name : grep $name details.txt done
Consider name, in, ram, shyam etc as arguments to the function "for"
for f in *; do echo $f; done will be expanded as: for f in file1.c file2.c file.h; do echo $f; done
for f in `find . -name "*.cpp"`; do echo $f; done
for f in `seq 1 20`; do echo $f; done