Hello. I'm having trouble figuring out how to write this script. I'm supposed to have my script start up with specific arguments and if there are missing arguments or invalid arguments, return an error associated to its errorlevel number.
For example, here are a few errorlevel numbers with their event information.
16 Third argument present, but not what expected (“-o”)
17 Fourth argument missing on command line
18 Too many arguments provided on command line (>4)
First off, i'm supposed to execute my shell script with these specific arguments :
I've added the following to my script to make sure the script is started with those arguments :
The part i can't seem to figure out is how to get my script to return an error and an errorlevel number. I was thinking maybe using IF statements in conjungtion with the $? variable but i'm not totally sure. Help would be much appreciated.
Hey there.
I'm new in write bash scripts in fact this is my first one so please be patient ;). Also english is not my native language but i hope you understand me anyway.
I installed xubuntu on my mothers laptop and every time a new version update gets installed the keyboard doesn't work... (9 Replies)
Hi there,
Now I'm facing error regarding running shell script via cron.
The shell script which is required to get value from database.
Below is the main part of shell script.
#/bin/bash
#connect to database(1)
db2 connect to $database user xxxx using yyyy
#set values from... (3 Replies)
Hi,
I am trying to login from one AIX server to another without using a password, a basic configuration, however it doesn't seem to work.
All things are in place. I have both a public and private key in the ~/.ssh folder and also have an "authorized_keys" file on the target-server containing... (5 Replies)
I am setting up a system as an ADSL gateway. ADSL is working fine. PF is not forwarding for some reason.
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33196
priority: 0
groups: lo
inet6... (0 Replies)
I am aware this question has been answered time and again. I feel I have tried everything I have seen on the net and really need help to get this working.
Same old story. Shell script, working from command but not from cron. I need my script to take values from a .properties file. Tried... (2 Replies)
I have a cronjob that I need to run everyday and it needs to have todays date inputed, here is what I have, but is not working as expected..........
23 02 * * * cd /path;./RequestSummaryReport.sh $(date +%Y-%m-%d)
the output from mail gives me.............
Date: Fri, 8 Feb 2008 02:12:07... (4 Replies)
Hello
I created an application in c language for HP-UX operative system,and it runs on a 32 bits PARISC processor. My problem is that I have to run this same application but now in a 64 bits Parisc processor. But I am not able to compile the application with the 64 bit server, and I only could use... (1 Reply)
Hi Guys,
I am trying to compare using if, but keep getting some strange results.
if ; then
keeps creating the file 1
if ; then
does not work at all
if ; then
does not work
if ; then
does not work
if ; then
does not work eihter.
I am using a ksh, on Solaris (9 Replies)
HI, I just installed NetBSD i386 v. latest. I am having a few problems: For some reason X just won't start!? Another is I can't access My CDROM or Floppy.
Thanks in advance! (3 Replies)
i keep getting the following error with the code segment below when i try to compile the program.
The code is from 'defs.h'
parse error before '('
parse error before ')'
stray '\' in program
this is the code segment and the error is on the second line of the segment
#define... (1 Reply)