Sponsored Content
Top Forums Shell Programming and Scripting Error in script confirmed and to be continued Post 302449353 by ave-phoenix on Monday 30th of August 2010 10:30:03 AM
Old 08-30-2010
Thanks.. i change de code, but this is the problem

Quote:
Originally Posted by zaxxon
I did not understand.

You want a script that takes [yes|no] and if the answer is "yes", you want it to echo some text, right?
As a side note, you do not need to sudo for a simple echo. Every user with a shell can do this.

Last edited by ave-phoenix; 08-31-2010 at 03:24 AM..
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Scrolling text continued

Perderabo * Unix Daemon * Join Date: Aug 2001 Location: Ashburn, Virginia Posts: 9,071 Using head and tail like that is terribly inefficient. I decided to try a rewrite. Sheesh...I spent all morning on this.... Code: #! /usr/bin/ksh # # scroller --- display text, but sleep every... (0 Replies)
Discussion started by: jamesapp
0 Replies

2. Shell Programming and Scripting

Parallel processing - continued

Hi, I am taking up the cue from where I was left in my earlier post ( link given below ) https://www.unix.com/shell-programming-scripting/231107-implement-parallel-processing.html I actually wanted to know the significance of using the Unix "wait" , which returns the control from background to... (3 Replies)
Discussion started by: kumarjt
3 Replies

3. Linux

Debian Grub 1.99 alters BIOS (confirmed after formatting hard disk)

Hi, I am a long time Windows user and recently try this Debian Wheezy OS. Burn Debian ISO in Windows environment and then select DVD ROM drive to boot first in BIOS. The first installation of Debian (GNOME) was with multi-boot option that allows booting from hard disk and DVD drive. I then... (4 Replies)
Discussion started by: Linuxmun
4 Replies

4. Shell Programming and Scripting

Reading a long literal continued next line

I am trying to identify all messages or prompts from a number of COBOL programs and they can usually be identified by a pair of double quotes on one line. However, sometimes the literal will not be finished on the first line but after a dash in column 7 of the next line, the literal will be... (6 Replies)
Discussion started by: wbport
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 12:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy