LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-08-2004, 10:10 AM   #1
kbajwa
LQ Newbie
 
Registered: Nov 2003
Location: Tennessee
Distribution: LINUX RH9
Posts: 7

Rep: Reputation: 0
Unhappy print commands!


I have created a file to run several lines of commands. Example I create a test file with the following lines in it:

-----------
#!/bin/sh
sleep 2
cd /usr/local
-----------

When I double click test & "Run in Terminal" it runs file. What I want to do is to display each line as it is being run. Therefore, I want to see "sleep 2" in the terminal window, then "cd /usr/local", and so on.

What I see now is result generated by a line. Any suggestion?

Kirti
 
Old 06-08-2004, 10:18 AM   #2
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
either change first line
#!/bin/sh -x

or just below the first line
set -x
 
Old 06-08-2004, 10:37 AM   #3
kbajwa
LQ Newbie
 
Registered: Nov 2003
Location: Tennessee
Distribution: LINUX RH9
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks. It works. Wonderful.

Kirti
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM
Write shell commands to print ricki Programming 2 07-31-2005 03:52 PM
Read, Print Unix Commands? gopikrish Linux - General 1 12-11-2004 02:07 PM
Mozilla problems: Print/print preview doesn't work, not recording sites in history... andy_g_gray Linux - Software 3 01-23-2004 06:27 AM
Mandrake Commands like print screen etc.. lava Linux - General 3 06-11-2003 03:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration