![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing windows server alias name on windows or unix? | NycUnxer | UNIX for Dummies Questions & Answers | 1 | 03-26-2008 05:54 PM |
| SFTP from windows E:/ to unix server | pranavagarwal | Shell Programming and Scripting | 12 | 11-28-2007 10:58 AM |
| Shell Script to ftp from windows server | shilpa.rajput | Shell Programming and Scripting | 8 | 11-07-2007 12:52 AM |
| Windows Client Vs Unix Server? | collins | High Level Programming | 0 | 10-05-2004 10:49 PM |
| Windows Server 2k3 vs. Unix | CapsuleCorpJX | UNIX for Dummies Questions & Answers | 1 | 08-08-2004 05:21 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server
I have a .sh script which was running fine on all the UNIX Servers (AIX, SunSolaris). The script requires two mandatory parameters and many optional parameters. Now at a different client place who are on a Windows Server, when I try to execute the script through MKS Toolkit, there are couple of issues. The script runs very well if I don't provide any optional parameters. I don't understand why the script doesn't treat those as optional parameters. Am I invoking the wrong shell? I tried many options...
Sample script: Code:
#!/bin/ksh
while getopts :s:u:p:f:m:w:r: Option
do
case $Option in
s) Server=$OPTARG;;
u) User=$OPTARG;;
p) PassWd=$OPTARG;;
f) ParmFile=$OPTARG;;
m) Mode=$OPTARG;;
w) Warn=$OPTARG;;
r) Rows=$OPTARG;;
:) echo "ERROR: Invalid argument. $OPTARG requires a value."
display_usage;;
?) echo "ERROR: Unknown option $OPTARG."
display_usage;;
esac
done
shift `expr $OPTIND - 1`
Code:
BatchRun.sh -p <optional> <mandatory> <mandatory> Please advice if somebody had the same issue.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|