bash-3.2$ for i in 1 2 3 4
> do
> echo $i
> done
1
2
3
4
Hit Control-p on your keyboard next, and bash will turn your multi-line script into 1 line. i.e.:
bash-3.2$ for i in 1 2 3 4; do echo $i; doneAnd finally, if you use the command fc afterwards, it will take the script and put it into whatever $EDITOR you have set on your shell.
0 comments:
Post a Comment