10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Here is my code as below:
test.ksh:
=======
#!/bin/ksh
option="${1}"
while
do
case $1 in
-f) FILE="${2}"
echo "File name is $FILE"
;;
-d) DIR="${2}"
echo "Dir name is $DIR"
;;
-*)
echo "`basename ${0}`:usage: | " (5 Replies)
Discussion started by: zaq1xsw2
5 Replies
2. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hey, guys I really need some help with a project.
"Write a shell program that examines the command line... (8 Replies)
Discussion started by: sk192010`
8 Replies
3. Shell Programming and Scripting
I have the following bash script and it is not accepting the lines
"--"|"--""-")
"--""-"")
while
do
echo "Current Argument is ${1}"
case "$1" in
"--"|"--""-")
echo "Argument is ${1}"
shift # Skip ahead one to the next argument.
... (1 Reply)
Discussion started by: kristinu
1 Replies
4. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a phonebook program.
It should use functions to perform the required tasks. It should be menu-based,... (1 Reply)
Discussion started by: Rgasin02
1 Replies
5. Shell Programming and Scripting
Hi,
When I execute the below script, I am getting the error as
' is not expected.ror at line 3 : `in
#!/bin/sh
case $1 in
-r) echo Force deletion without confirmation ;;
-i) echo Confirm before deleting ;;
*) echo Unknown argument ;;
esac
I could not see any problem with... (1 Reply)
Discussion started by: Sathish_Obla
1 Replies
6. Shell Programming and Scripting
Guys,
Here is the script syntax which is not accepting the parameters & not performing the said activity.
$ ./routing.sh xyz123-ra str enable
**********************************************************************
Preparing to service the request for Device xyz123-ra in Question... (9 Replies)
Discussion started by: raghunsi
9 Replies
7. Shell Programming and Scripting
Hi,
I need modify the all lines in a file into one format.
cat file
htec.twe34c.ATI
.hesh.twdghu..ATI
..hesh.twdghu..ATI
htec.twe3
hjsct14567ati
Output should have 16 characters
htectwe34c ATI
heshtwdghu ATI
heshtwdghu ATI
htectwe3 ATI
hjsct14567 ATI (4 Replies)
Discussion started by: kartheek
4 Replies
8. Shell Programming and Scripting
Hi all,
I think i'm asking a sqtupid question here..
i'm using case sttament, what is the syntax or symbol for "or"?
I thought was ||
here a quick sample of my case statment
echo "Would you like to update your detail ?"
read response
case $response in
... (2 Replies)
Discussion started by: c00kie88
2 Replies
9. Shell Programming and Scripting
Hi All,
this small script is written to recognize user input character.. it is in small case .. upeer case or is a number... but when i input first capital letter say A.. it always gives small character.... what is the problem.
#!/bin/bash
echo "Enter the character"
read a
case $a in
)... (2 Replies)
Discussion started by: johnray31
2 Replies
10. Shell Programming and Scripting
Hi all,
is it possible to create a 'dynamic' case statement.
ie
select option in `ls`
do
case satement depending on results of the above `ls`
done
I hope I have explained this ok!
Thanks
Helen (1 Reply)
Discussion started by: Bab00shka
1 Replies