The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-25-2008
Setan Setan is offline
Registered User
 

Join Date: Jan 2008
Location: Buffalo, NY
Posts: 5
Append Status to echo'd line after process completes

Hello All,

I'm very new to scripting and I'm writing a very simple script to restart a couple processes because I'm getting to lazy to cd between directories.

This is pretty much my first script and I just want to add a little cosmetics to it.

Here's what I have:
Code:
#!/bin/ksh
echo 'Stopping digital processes...'
/usr/local/xgate.ment/xgate.ment stop
/usr/local/xgate.liver/xgate.liver stop

echo 'Starting digital processes...'
/usr/local/xgate.ment/xgate.ment start
/usr/local/xgate.liver/xgate.liver start

point xgate

I'd like to add something that will append the word "Stopped" to 'Stopping digital processes...', when the two processes are stopped, but display it on the same line, so I don't have two lines like the following:

Stopping digital processes...
Stopping digital processes...Stopped

Is there a way to do this.
Reply With Quote
Remove advertisements
!!
Forum Sponsor