useless command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers useless command
# 1  
Old 05-08-2007
useless command

Hi, I came across with this line "set -x" in the beginning of a script, but i can't find one logic reason for this... should be something else after, i think.... anyone can help?
tanx
# 2  
Old 05-08-2007
-x Print commands and their arguments as they are exe-
cuted.
# 3  
Old 05-08-2007
set -x

Used for debugging can be useful in a loop if you put a read stty in the loop it waits for input in each iteration and you can look at your variables.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. What is on Your Mind?

Quest for the most useless command

I wrote by accident: cd . and even hit ENTER. Then I realized this is probably the most useless command that you can imagine. Yes, perhaps it could assert that there is still a working filesystem, but I am not sure about it. What do you think? Can you think of any more useless commands? :) (6 Replies)
Discussion started by: colemar
6 Replies

2. What is on Your Mind?

Fighting useless use of cat

Fighting UUOC cat filename|while read line; do ... with sed 's/cat *\(*\) *|/<\1/g' I found that while loops are converted to <filename while read line; do ... Syntax error! Why syntax error? It would perfectly make sense. Further, read the article how-would-you-like-your-loops-served-today... (5 Replies)
Discussion started by: MadeInGermany
5 Replies

3. Shell Programming and Scripting

Useless Cat usage

cat ~/text.xt | while read line do echo ${line} | perl -pe 's/(\d+)/localtime($1)/e' done how can i efficiently re-code the above? also, no matter how i run this, i'm not getting the current/correct date. the contents of the "text.xt" looks like this: SERVICES... (2 Replies)
Discussion started by: SkySmart
2 Replies

4. AIX

MKSYSB + tar / on same server: difference and useless ?

Hi again, we have several types of backups we do here. On the workstations backups that we do every 3 months, we do 2 backups on each ones: mksysb and a TAR /. I need to understand better what that mksysb does and figure out if doing both is useless where only one is enough I am looking at... (1 Reply)
Discussion started by: Browser_ice
1 Replies
Login or Register to Ask a Question