The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
List Process with their Status. varungupta UNIX for Advanced & Expert Users 2 03-21-2008 09:27 PM
Ftp Service /process Status GaneshB Linux 1 03-10-2008 10:15 AM
append a line to the last line in a file subhrap.das UNIX Desktop for Dummies Questions & Answers 5 04-25-2007 09:17 AM
append line ymeyaw UNIX for Dummies Questions & Answers 7 04-09-2006 10:14 PM
killing unix job after the job process completes dtazv Shell Programming and Scripting 1 07-22-2005 06:44 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0