10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
While I am trying to check the filename/s in IF statement of a shell script (RedHat Linux 6) I am getting below error:
filename_time2=`date --date='yesterday' +%Y-%m-%d`
cp server.log-$filename_time2* ../archive/new... (5 Replies)
Discussion started by: Dip
2. Shell Programming and Scripting
I am using the script for creating local queue and passing the arguments while running the script as below
e=`expr $n + 3`
echo 'DEFINE QL('$e') MAXDEPTH('$6') MAXMSGL('$7') DEFPSIST('$8') '$9'' | /apps/mqm_opt/bin/runmqsc $2
n=`expr $n + 1`
Running the... (5 Replies)
Discussion started by: Anusha M
3. Shell Programming and Scripting
I have a shell script, when run it i get a prompt to enter arguments say 1 for doing my next task otherwise q for quit.
What I am trying to do is run the shell script with the argument passed in however it does not seem to work.
This is what I did
Instead it printed the line... (6 Replies)
Discussion started by: aqua9
4. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I need to create a shell script the takes three arguments and echo's out "There once was a ____that____who like to_____"
The arguments go where the blanks are.
-Do an LS and store the... (4 Replies)
Discussion started by: dw15
5. Shell Programming and Scripting
I have to make a shell script doing that :
the program tests if there is an argument, if there is it checks whether this is a directory or not, If it is it opens it.
for any .c file in the directory it prints 2 lines in the screen :
the dependence line of the .o and compiler commend... (1 Reply)
Discussion started by: dekl
6. Shell Programming and Scripting
i want to check passed arguments one by one and if it is user print home director of that user (3 Replies)
Discussion started by: testman84
I have to write a C program using sys call (read, no fread) to read from shell all the parameters, without know how many are them.
I tryed in some ways, but I have no success.
Can I use read to read from stdin? (1 Reply)
Discussion started by: DNAx86
8. Shell Programming and Scripting
How can I check the number of arguments passed from the shell in a bash shell ? (1 Reply)
Discussion started by: DNAx86
9. Shell Programming and Scripting
I need some help/ideas in coming up with a shell script.
Basically, the script should install 1 or 2 or 3 packages based on the input arguments.
For example, if I type in pkgscript.sh a1 a2 a3, it should install all the 3 scripts and pkgscript.sh a1 should install only a1.
If a... (3 Replies)
Discussion started by: sankar6254
10. UNIX for Advanced & Expert Users
Is it possible to pass one argument to a shell program
eg) there is a shell program abc which takes one arguments
Due to some reasons I pass
abc one two
Now one,two must be considered as "one" argument to the shell programs. Any suggestions,hints are welcome.
... (3 Replies)
Discussion started by: csvenkata