Sponsored Content
Top Forums Shell Programming and Scripting Append Status to echo'd line after process completes Post 302161729 by Setan on Friday 25th of January 2008 04:36:43 PM
Old 01-25-2008
Ok, I've changed the script like you have shown and my script now looks like:
Code:
#!/bin/ksh
echo -n 'Stopping digital processes...'
#/usr/local/xgate.ment/xgate.ment stop
#/usr/local/xgate.liver/xgate.liver stop
echo Stopped

echo -n 'Starting digital processes...'
#/usr/local/xgate.ment/xgate.ment start
#/usr/local/xgate.liver/xgate.liver start
echo Stopped

This is the output I get:
Code:
aaawcny:/home/itmike/scripts # ./digital.restart
-n Stopping digital processes...
Stopped
-n Starting digital processes...
Stopped

It's close but I'd like to have "Stopped" appended to the original, like this:
"Starting digital processes...Stopped"

Rather than underneath it. Is that possible without too much work?


Also, what does the -n argument do with echo? It doesn't seem to do anything as it printed to the terminal.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

echo, append to end of file

I need the line printed with echo to append to eof of to exactly line, am i able to do that? i mean echo "sysctl -w lalala=1" > to end of file /etc/sysctl.conf or to the 21st line, if the line exist, open new line and insert text there. Thx.maybe i'm in wrong topic but anyway... (2 Replies)
Discussion started by: hachik
2 Replies

2. Shell Programming and Scripting

killing unix job after the job process completes

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. ... (1 Reply)
Discussion started by: dtazv
1 Replies

3. Shell Programming and Scripting

How to capture status code and echo a message

Im trying to execute application and its return code is below IF Status code=o echo "........" else Staus Code =-2 DJRE then echo "......" Can any one help me how to handle the status code and echo some message. (12 Replies)
Discussion started by: laknar
12 Replies

4. Programming

process status

hello everybody!! i want to post a question! is there any way to get process status using C commands? To be more specific, i want to know whether a process is running or is stop or killed. thanks in advance! (3 Replies)
Discussion started by: nicos
3 Replies

5. UNIX for Advanced & Expert Users

how to delay a process getting killed before it completes its work

The problem i am encountering is the process is getting killed before it dispalys the details.The details are displayed using printf.I created a new buffer for printing the details using setvbuf function call instead of output buffer.This is not working.The thing is,killing of the process must be... (1 Reply)
Discussion started by: cijkmysj
1 Replies

6. UNIX for Advanced & Expert Users

Status of a Linux process

All, I have fair amount of knowledge about shell scripting, but only liitle on system administration. I would like to know how to analyze whether the particular linux process is alive or not ? If it is alive, will it affect the performace of other process ?. Also is it still consuming... (1 Reply)
Discussion started by: apsprabhu
1 Replies

7. UNIX for Dummies Questions & Answers

How can I learn the status of a process

how can I learn the status of a process (sleeping, running or ready.) (2 Replies)
Discussion started by: merturk
2 Replies

8. UNIX for Dummies Questions & Answers

Echo does not work to append to a new line

Hi, i am witing a function in a shell script which will echo the file name and witre in to the new line, but i dont get expected results. The below is my code #!/bin/bash DATE=$1 myview(){ base_name=$1 echo -ne "${base_name}${DATE}">> /path/to/file/txt } myview sample3030 myview... (5 Replies)
Discussion started by: vikatakavi
5 Replies

9. Shell Programming and Scripting

Echo printing a line in 2 lines; expected to print in one line

Dear All, fileName: therm.txt nc3h7o2h 7/27/98 thermc 3h 8o 2 0g 300.000 5000.000 1390.000 41 1.47017550e+01 1.71731699e-02-5.91205329e-06 9.21842570e-10-5.36438880e-14 2 -2.99988556e+04-4.93387892e+01 2.34710908e+00 4.34517484e-02-2.65357553e-05 3 ... (7 Replies)
Discussion started by: linuxUser_
7 Replies

10. Shell Programming and Scripting

Gnu tool; sed awk echo etc to prepend or append string to a file

Looking to add text to a file, example File example; nodegroups: check-hosts: L@host.domain.com,host2.domain.com,host3.domain.com I need to take a file with a one line list of hosts separated by commas host.domain.com,host2.domain.com,host3.domain.comand prepend the string " ... (6 Replies)
Discussion started by: bash_in_my_head
6 Replies
GNUCAP(1)							    Debian GNU								 GNUCAP(1)

NAME
gnucap - GNU Circuit Analysis Package SYNOPSIS
gnucap [-b filename] [-i filename] DESCRIPTION
GNUCAP is a general purpose circuit simulator. It performs nonlinear dc and transient analyses, fourier analysis, and ac analysis lin- earized at an operating point. It is fully interactive and command driven. It can also be run in batch mode or as a server. The output is produced as it simulates. Spice compatible models for the MOSFET (level 1,2,3) and diode are included in this release. Since it is fully interactive, it is possible to make changes and re-simulate quickly. The interactive design makes it well suited to the typical iterative design process used it optimizing a circuit design. It is also well suited to undergraduate teaching where Spice in batch mode can be quite intimidating. This version, while still officially in beta test, should be stable enough for basic undergraduate teaching and courses in MOS design, but not for bipolar design. In batch mode it is mostly Spice compatible, so it is often possible to use the same file for both GNUCAP and Spice. The analog simulation is based on traditional nodal analysis with iteration by Newton's method and LU decomposition. An event queue and incremental matrix update speed up the solution for large circuits (at some expense for small circuits). It also has digital devices for mixed signal simulation. The digital devices may be implemented as either analog subcircuits or as true digital models. The simulator will automatically determine which to use. Networks of digital devices are simulated as digital, with no conversions to analog between gates. This results in digital circuits being simulated faster than on a typical analog simulator, even with behavioral models. The digital mode is experimental and needs work. There will be substantial improvements in future releases. OPTIONS
Two command-line options are available. Only one of these may be specified. If no parameters are given, gnucap will start in interactive mode. -b filename execute the commands in the named file then exit (batch mode) -i filename execute the commands in the named file then go into interactive mode BUGS
See /usr/share/doc/gnucap/bugs for a list of known bugs in this release. GNUCAP is an ongoing research project. It is being released in a preliminary phase in hopes that it will be useful and that others will use it as a thrust or base for their research. I also hope for some comments that may help me direct my research. AUTHOR
GNUCAP is being written by Albert Davis <aldavis@ieee.org> This manual page was written by Jon Rabone <jkr@debian.org> and maintained by Hamish Moffatt <hamish@debian.org> for the Debian package of gnucap. For the full LaTeX documentation, please see /usr/share/doc/gnucap/manual. Debian Project November 2001 GNUCAP(1)
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy