01-02-2009
set -x command
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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: ravi raj kumar
4 Replies
2. Shell Programming and Scripting
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)
Discussion started by: scotty_123
4 Replies
3. Shell Programming and Scripting
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)
Discussion started by: ali560045
2 Replies
4. Shell Programming and Scripting
Hi,
I am new to unix and trying to learn shell scripting. I am using Redhat linux instead of unix and using Bash shell.
I typed some code which consist of "set" command. I got the code from a book.
The code is,
set 'who am i'
echo $name
Actually the... (3 Replies)
Discussion started by: saravanakumar
3 Replies
5. UNIX for Dummies Questions & Answers
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)
Discussion started by: agasamapetilon
2 Replies
6. Shell Programming and Scripting
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)
Discussion started by: Shribigb
0 Replies
7. UNIX for Dummies Questions & Answers
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)
Discussion started by: srage
1 Replies
8. HP-UX
Hi,
I am using hp unix
i want to know the use of the following commands
set --
set - variable
thanks (4 Replies)
Discussion started by: gomathi
4 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: Straitsfan
5 Replies
10. UNIX for Dummies Questions & Answers
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)
Discussion started by: mac4rfree
2 Replies
OPENVT(1) Linux 1.x OPENVT(1)
NAME
openvt - start a program on a new virtual terminal (VT).
SYNOPSIS
openvt [-c vtnumber] [-s] [-u] [-l] [-v] [--] command command_options
DESCRIPTION
openvt will find the first available VT, and run on it the given command with the given command options, standard input, output and error
are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the
environment variable $SHELL is used.
OPTIONS
-c vtnumber
Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work.
-e Directly execute the given command, without forking. This option is meant for use in /etc/inittab.
-s Switch to the new VT when starting the command. The VT of the new command will be made the new current VT.
-u Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with -c or -l.
-l Make the command a login shell. A - is prepended to the name of the command to be executed.
-v Be a bit more verbose.
-w wait for command to complete. If -w and -s are used together then openvt will switch back to the controlling terminal when the com-
mand completes.
-- end of options to openvt.
NOTE
If openvt is compiled with a POSIX (GNU) getopt() and you wish to set options to the command to be run, then you must supply the end of
options -- flag before the command.
EXAMPLES
openvt can be used to start a shell on the next free VT, by using the command:
openvt bash
To start the shell as a login shell, use:
openvt -l bash
To get a long listing you must supply the -- separator:
openvt -- ls -l
HISTORY
Earlier, openvt was called open. It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>. The -w idea is from "sam".
SEE ALSO
chvt(1), doshell(8), login(1)
19 Jul 1996 V1.4 OPENVT(1)