10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I have been trying to work on a simple shell script that will just add the two argument passed to it. Here is what i tried :
#!/bin/bash
welcome(){
echo "Welcome to this Progg. which will accept two parameter"
}
main_logic(){
arg=$#
echo "Number of argument passed is... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
2. Shell Programming and Scripting
Hello
Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Discussion started by: aadityapatel198
6 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I am running the script
VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt
result=`cat har1out.mytxt | grep $1'
echo $result
echo $1
{
if
then
echo pass
else
echo fail
fi (2 Replies)
Discussion started by: harsha85
2 Replies
4. Shell Programming and Scripting
Hi I am new in shell,
I am trying to create a small script that can do exit if a script is executed when argument not 2
#!/bin/sh
if ; then
echo greater
exit 1;
elif ; then
echo less
exit 1;
fiit keeps returning me
whatever number of argument I... (1 Reply)
Discussion started by: peuceul
1 Replies
5. Shell Programming and Scripting
Hello,
Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file
i.e I am workiing on a script which will run through crontab and the script will
chekout the code ,zip and copy to the... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies
6. UNIX for Dummies Questions & Answers
Hey everyone,
I need to write a script that will display the number of the argument before displaying the argument itself. Here's what I have so far:
for arg in "$@"
do
echo $#:$arg
done
This returns the sum of all arguments preceding the arguments themselves.
$(script) a b c
3:a... (1 Reply)
Discussion started by: unclepickle1
1 Replies
7. Shell Programming and Scripting
If ($argv == “-debug”) then
Echo “in loop”
Endif
But this is not working. If I modify this code and remove “-“, then it works.
Similarly I am getting problem using grep command also
Grep “-debug” Filename
Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies
8. UNIX for Dummies Questions & Answers
I have a script named abc.sh and another script ab.sh
I execute one as:
./abc.sh
and another ./ab start
that is with an argument , so wanted to know what is this start a file or something else? (4 Replies)
Discussion started by: nixhead
4 Replies
9. UNIX for Dummies Questions & Answers
How to find the last argument in a argument line? (4 Replies)
Discussion started by: nehagupta2008
4 Replies
10. Shell Programming and Scripting
What is the script that takes a port number as parameter and displays status, whether it is available or is already used by other process
pls help (1 Reply)
Discussion started by: saikiran
1 Replies