01-12-2012
No I was not sure, then I found something while scouring the net to find something to help me, and it said to not use exec so i took them all out.
---------- Post updated at 03:36 PM ---------- Previous update was at 01:33 PM ----------
Thanks for all the help guys, but I figured it out. On all the lines with read -e I took out the $ before all the MB, CT, RS, etc. Works great now! Again, thanks/
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I'm trying to compile and install both most recent version of 'make' and the
most recent version of 'openssh' on my Sparc20.
I've run into the following problems... and I don't know what they mean. Can
someone please help me resolve these issues?
I'm using the 'make' version that was... (5 Replies)
Discussion started by: xyyz
5 Replies
2. UNIX for Dummies Questions & Answers
Hi
how can i do this?
1) shell script which writes data and time on to a file if filesystem exceeds 70% of space.
2) make entry to cron table to run a script every 15 mins.
and can anyone expplain or demonstrate the difference between variables used in inside a function and outside a... (3 Replies)
Discussion started by: vivekshankar
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
I,ve a Unixware 7.1.3 working correctly for two years ago, since a several weeks I've a problem with the command last . The information that this command return is :
For example :
1.- The user root , time login : 12:15 h, time logoff 12:15 h (the real time is 14:00). Connected time is... (3 Replies)
Discussion started by: By_Jam
3 Replies
4. UNIX for Dummies Questions & Answers
I'm having problems uses "if"
it works fine when i do this.
#!/bin/sh
a= 10
qw= 2
w= 20
{
if && ;then
echo 3
fi
}
However if i try to do
#!/bin/sh
a= 10 (5 Replies)
Discussion started by: THM
5 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I am having problems with using less on
Linux version 2.6.18-92.1.17.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)). I am using csh but have the same problems on bash.
If I pipe something to less it works perfectly i.e. cat file | less... (9 Replies)
Discussion started by: z1dane
9 Replies
6. Shell Programming and Scripting
Hello, I have the following piece of code that tries to retrieve the result of a .sh:
. $HOME/prueba/Scripts/Recogida/recogida_sedra.sh
resultado=$?
echo "el resultado es : $resultado"
if ; then
echo "Se va a preprocesar los archivos"
In the code of recogida.sh I have the... (8 Replies)
Discussion started by: danietepa
8 Replies
7. SuSE
good friends I am new to linux and I have the following
TELNET service problem entering data devo
telnet to a Windows server 2003 server and passes
will not let me since the move to this server by
telnet tells me the characters and thus invalidates me
income, I have a service application... (1 Reply)
Discussion started by: pepetico
1 Replies
8. UNIX for Dummies Questions & Answers
I have written the following code in cygwin to create directories in windows based on the parameter passed.
echo $1 > fullpath
path1=`awk -F / '{print $1}' $fullpath
path2=`awk -F / '{print $2}' $fullpath
if
then
if
then
if
then
continue
... (4 Replies)
Discussion started by: janardhanamk
4 Replies
9. Shell Programming and Scripting
I'm new in Shell Programming and Scripting, I would like to ask some questions.
ps -ef | grep $appNAme | grep -v grep <-- what will it return when it find a process is running? return 1 or 0
if
then
exit 1 <--- if = 0 , run this ?
else
continue <--- if = 1 , run this ?... (5 Replies)
Discussion started by: LoAlex
5 Replies
LEARN ABOUT MOJAVE
escape
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)