Sponsored Content
Top Forums Shell Programming and Scripting Append Status to echo'd line after process completes Post 302161735 by shamrock on Friday 25th of January 2008 04:51:16 PM
Old 01-25-2008
Code:
echo 'Stopping digital processes...\c'
/usr/local/xgate.ment/xgate.ment stop
echo 'Stopped'

 

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
escape(1)							Mail Avenger 0.8.3							 escape(1)

NAME
escape - escape shell special characters in a string SYNOPSIS
escape string DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result. EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string: $ var='; echo gotcha!' $ eval echo hi $var hi gotcha! $ Using escape, one can avoid executing the contents of $var: $ eval echo hi `escape "$var"` hi ; echo gotcha! $ A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient: #!/bin/sh formail -x to -x cc -x resent-to -x resent-cc | fgrep "$1" > /dev/null && exit 0 echo "<$1>.. address does not accept blind carbon copies" exit 100 To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt script: bodytest reject_bcc `escape "$RECIPIENT"` SEE ALSO
avenger(1), The Mail Avenger home page: <http://www.mailavenger.org/>. BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells. AUTHOR
David Mazieres Mail Avenger 0.8.3 2012-04-05 escape(1)
All times are GMT -4. The time now is 08:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy