How to write multiple echo statements in unix?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to write multiple echo statements in unix?
# 1  
Old 01-09-2007
How to write multiple echo statements in unix?

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 "*************************************************************************************************** ********";

This is giving some error. Please help!
# 2  
Old 01-09-2007
backslash

If your pattern is spanning another line, end the first line with a backslash -
Code:
$ echo \
"*****";

will do the same work as
Code:
$ echo "*****";

# 3  
Old 01-09-2007
Or you can do

Code:
echo "
******************************************;
  This Script do the following functions
  1. Point 1
  2. Point 2
  3. Point 3
echo **************************************;
"

Note the quotes at the beginning and end only.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using multiple 'for' statements

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

2. UNIX for Dummies Questions & Answers

Multiple if statements

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)
Discussion started by: lawsongeek
7 Replies

3. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

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)
Discussion started by: scriptscript
11 Replies

4. Shell Programming and Scripting

Multiple while statements?

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)
Discussion started by: nickzourdos
3 Replies

5. Shell Programming and Scripting

Multiple if Statements

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)
Discussion started by: ch33ry
4 Replies

6. Shell Programming and Scripting

multiple echo statements in if condition

Hi , I have a peculiar problem. i have an if block like this if ; then echo " todays date is " ${date} >> log_file echo " file count is " $ count >> log_file mv filename1 filename 2 else echo "no files available ">> log_file fi the echo statement "no files available " is not... (2 Replies)
Discussion started by: wizardofoz
2 Replies

7. Shell Programming and Scripting

put value of multiple sql statements into unix variables

i want to use multple sql count statements and store these count values in unix variable but in one connection only i.e. in only 1 time database should be hit ,which is the main requirement. (1 Reply)
Discussion started by: sw@pnil
1 Replies

8. Shell Programming and Scripting

how to write examination(multiple choice) script in unix

Hi, I am unable to get idea, how to write the script like multiple choice exam model script , how to specify the welcome to the exam(name) and if he select option then it has to enter into the exam , then choosing the answers,next question and going to previous question. Thanks & Regards ... (0 Replies)
Discussion started by: palreddy7
0 Replies

9. Shell Programming and Scripting

how can i write the following statements on one line?

Hi, At the moment, I have the following statements which show like this, but I want it all on one line. How can I do this? ---------------------------- echo "There are" cat menu | wc -l echo "characters in the text" ---------------------------- Thanks! (5 Replies)
Discussion started by: kev269
5 Replies

10. Shell Programming and Scripting

How to place the output of two different echo statements on one line

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)
Discussion started by: JoBa
5 Replies
Login or Register to Ask a Question