help


 
Thread Tools Search this Thread
Operating Systems Linux help
Prev   Next
# 1  
Old 12-15-2005
Data help

ey.. i just started learning shell scripting in Mandrake linux... I have a program that will have to accept arguments and do validations if the arguments entered are containing characters other than numeric characters... I was able to detect alphabetic characters and symbols like , + - . etc.... and error messages are displayed. But when arguments containing symbols like * ) [ & ( and other characters which have special meanings, my script is not able to trap them and treat as ordinary strings that are part of my arguments...
to explain more clearly.. here's an example..

# ./sample.sh a677 7 678
--->>> here, a message indicating that the first argument contains a character is displayed. This one works correctly.

# ./sample.sh 344 56& 557
---->>> here's the prob... this time,,, it stops when it reaches the symbol & and displays a message from bash... If I use single ( or ), an error message from bash also displays.

Can anyone help me with this?
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question
WALL(1) 							   User Commands							   WALL(1)

NAME
wall -- write a message to users SYNOPSIS
wall [-n] [-t TIMEOUT] [file] DESCRIPTION
Wall displays the contents of file or, by default, its standard input, on the terminals of all currently logged in users. The command will cut over 79 character long lines to new lines. Short lines are white space padded to have 79 characters. The command will always put carriage return and new line at the end of each line. Only the super-user can write on the terminals of users who have chosen to deny messages or are using a program which automatically denies messages. Reading from a file is refused when the invoker is not superuser and the program is suid or sgid. OPTIONS
-n, --nobanner Supress banner -t, --timeout TIMEOUT Write timeout to terminals in seconds. Argument must be positive integer. Default value is 300 seconds, which is a legacy from time when people ran terminals over modem lines. -V, --version Output version and exit. -h, --help Output help and exit. SEE ALSO
mesg(1), talk(1), write(1), shutdown(8) HISTORY
A wall command appeared in Version 7 AT&T UNIX. AVAILABILITY
The wall command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux April 2011 util-linux