The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Password cannot be circular shift of logonid sag71155 HP-UX 2 05-09-2008 06:04 AM
Bit shift operator naan High Level Programming 5 09-08-2006 03:13 AM
shift command Nisha Shell Programming and Scripting 6 07-19-2002 06:54 AM
xterm SHIFT crazy oneivan UNIX for Dummies Questions & Answers 2 06-05-2002 05:29 AM
shift command AkumaTay UNIX for Dummies Questions & Answers 1 05-20-2002 09:26 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-30-2007
shrao shrao is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 4
Regarding the shift command???

I am running a program where in I have this command
which is giving error the shift: number is not correct.
can you please tell me how shift actually works?

the line which is giving error is-
set $PARAM; shift; shift; shift; shift; shift; shift; shift; shift

Is it related somewhere to these parameters which is set before this line
PARAM=$*

case "$1" in
"-h"|"-H")
give_help
exit -1
;;
"-p"|"-P")
give_params
exit -1
;;
esac

eval REQID=`echo $PARAM | awk ' { split($2, var, "=")
printf("%s", var[2]) }'`
eval LOGIN=`echo $PARAM | awk ' { split($3, var, "=")
printf("%s", var[2]) }'`
eval USRID=`echo $PARAM | awk ' { split($4, var, "=")
printf("%s",var[2]) }'`
eval USRNM=`echo $PARAM | awk ' { split($5, var, "=")
printf("%s", var[2]) }'`
eval PRINT=`echo $PARAM | awk ' { split($6, var, "=")
printf("%s", var[2]) }'`
eval SVOUT=`echo $PARAM | awk ' { split($7, var, "=")
printf("%s", var[2]) }'`
eval COPNO=`echo $PARAM | awk ' { split($8, var, "=")
printf("%s", var[2]) }'`

export PARAM \
REQID \
LOGIN \
USRID \
USRNM \
PRINT \
SVOUT \
COPNO
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0