10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have to send some files as attachments to an email using mailx copmmand in a shell script.
The files will be generated by some other application everyday with names starting with the literal 'Send' followed by some random sequence of characters in the filenames.
I tried... (1 Reply)
Discussion started by: sagarparadkar
2. Shell Programming and Scripting
I'm writing an argument checking block and running into an error. I want to confirm that $1 is one of two values. Here is what I have:
if ]; then
echo -e "\nPlease check your first augument. You used \"$1\"
which is not recognized. Please see usage:"
... (9 Replies)
Discussion started by: hburnswell
3. Shell Programming and Scripting
I need a script that should print 'yes' if the argument is a valid shell variable name else 'No' if it is not a valid shell variable. A valid one begins with an alphabet or percentage (%) character and is followed by zero or more alphanumberic or percentage (%) characters.
$... (6 Replies)
Discussion started by: pingiliarjun
4. Shell Programming and Scripting
I have created a csh script which allows user to pass input argument with the script like:
cluster_on_lev3.csh -t <value> -p <value>
cluster_on_lev3.csh -t 2.3 -p 0.05
Now I want to create an error code where if user passes input argument without spaces , the code... (16 Replies)
Discussion started by: dixits
5. Shell Programming and Scripting
I would like to know how I can check whether there is one or more folders in the current directory which begins with e.g. 2011-11.
Initially I figured that this could easily be done simply by:
if ; then ...
However if there is more than one folder which begins with 2011-11 then it... (1 Reply)
Discussion started by: aknu
6. UNIX for Advanced & Expert Users
I allow the user tommy to run this command as root
sudoCommand: /app/appname/connectors/*/*/current/bin/*With "sudo -l" he sees the sudoers, but is unable to execute.
$ sudo /app/appname/connectors/zur/namename/current/bin/othername agentsvc --i --u root --sn 1m7command
Sorry, user... (2 Replies)
Discussion started by: slashdotweenie
7. UNIX for Dummies Questions & Answers
I have a script that when called can have 1 or 2 command arguments. If only 1 command argument is passed into the script how can I check that the second argument is null? I am working in Korn shell in a UNIX environment.
Example of script call with 2 arguments:
% statreport 0300 1430
... (6 Replies)
Discussion started by: Nysif Steve
8. Shell Programming and Scripting
Can you please suggest a few lines of if statement to check if a variable is an ip address purely in bash/sh?
Marc (3 Replies)
Discussion started by: marcpascual
9. Shell Programming and Scripting
How do I check if the argument passed to a script is an integer?
I am writting a script that will take to integers and want to be able to check before I go on.
I am using bourne shell.
Thanks in advance (13 Replies)
Discussion started by: elchalateco
10. UNIX for Dummies Questions & Answers
I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain3.com/tgp/... (1 Reply)
Discussion started by: Neko