The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 02-11-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,884
shift does exactly what you require. "shift 2" deletes the first two arguments from the argument list, eg. $3 becomes $1, $4 becomes $2, etc. If you want to output all your arguments sans the first two, do this
Code:
shift 2
echo "$@"