![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Awk Functions | pxy2d1 | Shell Programming and Scripting | 2 | 08-19-2008 11:41 AM |
| Use of functions | amitrajvarma | Shell Programming and Scripting | 1 | 11-23-2007 06:52 AM |
| functions in | Raom | Shell Programming and Scripting | 6 | 07-21-2006 04:06 AM |
| Regarding functions | sendhilmani | Shell Programming and Scripting | 2 | 03-24-2006 04:40 AM |
| FTP functions | hzambra | High Level Programming | 3 | 05-03-2002 02:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
functions
I have korn shells where I want to create a function passing $1 to a function , determine my $STAT_ENV value, set the paths and return
the paths for STATSH,STATPRM,STATSQR,STATSQL,STATCTL TO BE USED IN THE UNIX SCRIPT THE CALLED THE fucnction in the first place. Can someone tell me the best way to do this. It will be used in my production env. # this would be my function STAT_ENV=`echo "$1" | cut -c6-6` echo "$2 $STAT_ENV" > $logfile if [[ "$STAT_ENV" = "e" ]]; then SHELL=shd PARMS=prmd SQR=sqrd PAR=pard SQL=sqld CTL=ctld; elif [[ "$STAT_ENV" = "i" ]]; then SHELL=shi PARMS=prmi SQR=sqri PAR=pari SQL-sqli CTL=ctli; elif [[ "$STAT_ENV" = "u" ]]; then SHELL=shu PARMS=prmu SQR=sqru PAR=paru SQL=sqlu CTL-ctlu; else SHELL=shp PARMS=prmp SQR=sqr PAR=par SQL=sql CTL=ctl; fi # STATSH=/first/apps/$SHELL STATPRM=/first/apps/$PARMS STATSQR=/first/apps/$SQR STATSQL=/first/apps/$SQL STATCTL=/first/apps/$CTL |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|