I have the following proc.
Code:
proc get_add {arg1 arg2 arg3 arg4 arg 5 .. ... arg N }
{
}
i need to count the number of arguments and also i need those arguments stored in an array.
please help out
---------- Post updated at 06:33 PM ---------- Previous update was at 05:30 PM ----------
can i do it using pattern matching. pls help
Hello please kindly solve these doubts i have about the following scripts
Code:
Script 1
//Shell script that accepts arguments and prints them in reverse order//
echo "number of arguments"
len=$#;
while [ $len -ne 0 ]
do
eval echo \$$len
len=`expr $len - 1`
done
---------
Output
$sh test.sh a b
b
a
1.what is \$$len.what is the significance of the escape sequence
Script 2
Cod
When I run the following script with some arguments like arg1 arg2 arg3:
#!/bin/bash
zenity --entry --text="$@"
zenity creates an entry dialog with this text: "arg1" whereas I expect "arg1 arg2 arg3"
If I use a variable like the following script it shows all arguments for the entry text.
#!/bin/bash
text="$@"
zenity --entry --text="$text"
Whats the difference between these scripts?
I am new to schell scripting . My objective is to write a ksh shell script that performs following tasks: -
1. Script reads all command line arguments (arguments are file names) and checks if it contains charachters "abc" in it.
2. If it contains "abc" it will execute a binary file xyz <command line arguments>
Note: -
1. arguments can be from 1 to n.
2.
Hey Guys,
I have a program that populates a database based on input I feed it.
so it would look like:
cmd arg1 arg2 ... argN
Now some of the arguments have special characters in them so I wrote a small script to pull the args and wrap them in quotes ('arg'). The problem is sometimes the characters can be quotes.
I have a tcsh script which I pass arguments to. I want to store all the arguments except for the options.
Currently I am using the line below, however I want to also exclude and variation of them (e.g.
Hi,
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
./test.sh 1
Instead it printed the line to enter the command
test.sh
....some functions
...
Print "1) all
Print "q) qui
hi,
I am new in the shell script, and c programming with linux.
I have created a script which takes parameters and arguments.