Hello there,
I wrote a shell script to modify the code for some of our clients in our client database. Before starting the data modification the program performs a few checks.
When a check is being performed, it should be shown on the screen of the user running the program, the result of... (5 Replies)
How to write multiple echo statements in unix?
echo "************************************************************************************************************";
echo This Script do the following functions
echo 1. Point 1
echo 2. Point 2
echo 3. Point 3
echo... (2 Replies)
Please help me. I have been doing this for several hours.
Here is the code
if then
echo a b c d >> file.txt
echo 1111 >> file.txt
fi
The reason I want the two echo is because I want these statements printed on multiple lines. I keep getting error .
First it tells me... (2 Replies)
Hi All,
I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running....
is the below code correct.
#********** Check to see if Service 1 is still running**************
if
then
echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly.
Here's what I have so far:
... (3 Replies)
if
then
echo "Entry Valid : ${x_oug}"
else
echo "Entry Invalid : " 0
fi
In the above code the 3rd line is not working... it does not print anything
I tried following as well .. but no luck!
echo "Entry Valid : ... (13 Replies)
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
exmaple:
file1 and file2 has 1 bit
if
then
exit
else
send out email
fi
if
then
exit
else
send out email
fi
it exits the 1st if. did not continue with my 2nd if. thanks in advanced.
Please use CODE tags are suggested on every page when you post an item in... (7 Replies)
Hello,
I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file.
For example, I have two files already.
$ cat file1
andy
stephane
aby
paul
$ cat file2
123
234... (4 Replies)
Discussion started by: FemoTheDon
4 Replies
LEARN ABOUT LINUX
shtool-echo
SHTOOL-ECHO.TMP(1) GNU Portable Shell Tool SHTOOL-ECHO.TMP(1)NAME
shtool-echo - GNU shtool echo(1) extensional command
SYNOPSIS
shtool echo [-n|--newline] [-e|--expand] string
DESCRIPTION
shtool echo is an echo(1) style command which prints string to stdout and optionally provides special expansion constructs (terminal bold
mode, environment details, date, etc) and newline control. The trick of this command is that it provides a portable -n option and hides the
gory details needed to find out the environment details under option -e.
OPTIONS
The following command line options are available.
-n, --newline
By default, output is written to stdout followed by a "newline" (ASCII character 0x0a). If option -n is used, this newline character is
omitted.
-e, --expand
If option -e is used, string can contain special "%x" constructs which are expanded before the output is written. Currently the
following constructs are recognized:
%B switch terminal mode to bold display mode.
%b switch terminal mode back to normal display mode.
%u the current user name.
%U the current user id (numerical).
%g the current group name.
%G the current group id (numerical).
%h the current hostname (without any domain extension).
%d the current domain name.
%D the current day of the month.
%M the current month (numerical).
%m the current month name.
%Y the current year.
EXAMPLE
# shell script
shtool echo -n -e "Enter your name [%B%u%b]: "; read name
shtool echo -e "Your Email address might be %u@%h%d"
shtool echo -e "The current date is %D-%m-%Y"
HISTORY
The GNU shtool echo command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1998 for Website META Language (WML)
under the name buildinfo. It was later taken over into GNU shtool.
SEE ALSO shtool(1), echo(1).
18-Jul-2008 shtool 2.0.8 SHTOOL-ECHO.TMP(1)