|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there any way in a script to print out the commands being ran? In DOS script, there is the "@echo on" and "@echo off". so I have a script like this: Code:
#!/bin/ksh echo "hello there. moving files." <turn on echoing here> cp thisfile.txt thatfile.txt cp whatfile.prop whyfile.prop <turn off echoing here> echo "Done" So basically, I want to print out the copy lines so the user sees what's going on. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
To turn on tracing Code:
set -x To turn off tracing Code:
set +x Is this all you are after? Robin Liverpool/Blackburn UK |
| The Following User Says Thank You to rbatte1 For This Useful Post: | ||
ronron5477 (03-12-2013) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
EXCELLENT! That's what I needed. Thank you!
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| echo and grep commands | Sundown | Shell Programming and Scripting | 2 | 02-10-2012 12:25 AM |
| Having a hard time with the sed/echo commands? | arcelivez | UNIX for Dummies Questions & Answers | 8 | 03-13-2011 12:58 PM |
| Advice using cut & echo combination commands | dc18 | Shell Programming and Scripting | 6 | 07-27-2010 09:52 PM |
| SSH, Remote Commands and echo, oh my! | Wrathe | Shell Programming and Scripting | 12 | 07-22-2009 08:29 PM |
| Running two commands in one line | rdns | UNIX for Dummies Questions & Answers | 4 | 04-27-2009 11:04 AM |
|
|