You use set to set some variable in your current shell. What will work is
The 2 ticks around the "who i am" are backticks, which have the comand inside them to be executed.
You wrote it with single quotations marks. These deny any execution or substitution inside them.
You can just leave the set out of it and just write "name=...." btw.
Hi Unixers, :)
In a shell script i found the following statements
mline='grep\^ 1111 emaster.dbf
set -- $mline
The first statement searches the emaster.dbf file for the code 1111 and ifit finds any such line it gets that line and stores it in mline.
But iam getting little bit confusion with... (4 Replies)
Hello
I'm using command "set" to count number of word in file .
But I don't know how to get number of lines in file using commnad "set " ?.
Please Help.
#!/bin/sh
set -- `cat $1`
echo " $# words " # wc -w $1 (4 Replies)
i have a script in which i go to a particular dir and list all its file
------------------------------------------------------------------------
#!/bin/ksh
if test -d systemProperties
then
set --`cd systemProperties`
for i in *
do
echo "$i" >> lastm2.txt
done
fi... (2 Replies)
I have heard the following command and seen people using it at shell but I don't know what it is for and when it is used. I will appreciate any comment regarding the use of this command.
set -o vi (2 Replies)
hi all,
Please tell all the uses of set -x command.
Also can you tell about other options which can be used with set command.
Thanks:)
sumit (3 Replies)
Hi,
I have following scenario..
set -e
eval Command 1
eval Command 2
eval Command 3
gmake realclean
but now the problem is I want to print an error message, advising user to run gmake realclean after resolving errors if any of the Command1/2/3 failed. I know I can use trap to do... (0 Replies)
Hi all,
Some clarification regarding the unix set command for ksh env.
I read up the man pages, but ended up more blur. Eg.
- Turns off -x and -v flags and stops examining argu-
ments for flags.
- Does not change any of the flags. This option is
... (1 Reply)
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)