Документ взят из кэша поисковой машины. Адрес оригинального документа : http://comet.sai.msu.ru/UNIXhelp/scrpt/scrpt2.1.3.1.html
Дата изменения: Fri Jan 17 12:43:19 1997
Дата индексирования: Tue Oct 2 02:03:47 2012
Кодировка:

Поисковые слова: http astrokuban.info astrokuban
Example of using the shift command

Example of using the shift command

To successively shift the argument that is represented by each positional parameter:

   cat shift_demo
   #!/bin/sh
   echo "arg1=$1 arg2=$2 arg3=$3"
   shift
   echo "arg1=$1 arg2=$2 arg3=$3"
   shift
   echo "arg1=$1 arg2=$2 arg3=$3"
   shift
   echo "arg1=$1 arg2=$2 arg3=$3"
   shift_demo one two three four five six seven
   arg1=one arg2=two arg3=three
   arg1=two arg2=three arg3=four
   arg1=three arg2=four arg3=five
   arg1=four arg2=five arg3=six
   arg1=five arg2=six arg3=seven

[Home] [Search] [Index]