Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
how_to_use_linux_shell_for_beginners [2016/05/27 16:29]
Vincenzo
how_to_use_linux_shell_for_beginners [2016/05/27 16:32] (current)
Vincenzo
Line 246: Line 246:
 The script usually has the extension .sh (script.sh) and must be executable\\ The script usually has the extension .sh (script.sh) and must be executable\\
 <​code>​ <​code>​
-chmod + x script.sh+chmod +x script.sh
 </​code>​ </​code>​
 //​Example://​\\ //​Example://​\\
 <​file>​ <​file>​
-for i in $ (ls); do +for i in $(ls); do 
-echo item: $ i+echo item: $i
 done done
 </​file>​ </​file>​
Line 260: Line 260:
   echo $line |grep apache| gawk -F: '​{print $1"\t My home is:"​$7}' ​   echo $line |grep apache| gawk -F: '​{print $1"\t My home is:"​$7}' ​
 done done
-<​file>​+</file>
  
  
 {{tag>​userguide ht_tips }} {{tag>​userguide ht_tips }}