Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

echo(1f) [opensolaris man page]

echo(1F)							   FMLI Commands							  echo(1F)

NAME
echo - put string on virtual output SYNOPSIS
echo [string]... DESCRIPTION
The echo function directs each string it is passed to the standard output. If no argument is given, echo looks to the standard input for input. It is often used in conditional execution or for passing a string to another command. EXAMPLES
Example 1 A sample of the echo command. Set the done descriptor to help if a test fails: done=`if [ -s $F1 ]; then echo close; else echo help; fi` ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------------------------------------+ |ATTRIBUTE TYPE ATTRIBUTE VALUE | |Availability SUNWcsu | +-----------------------------------------------------------+ SEE ALSO
echo(1), attributes(5) SunOS 5.11 5 Jul 1990 echo(1F)

Check Out this Related Man Page

echo(3XCURSES)						  X/Open Curses Library Functions					    echo(3XCURSES)

NAME
echo, noecho - enable/disable terminal echo SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int echo(void); int noecho(void); DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially, curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft- ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined. RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5) SunOS 5.10 5 Jun 2002 echo(3XCURSES)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unmatched 'then'

I am having a problem with the following statement in a korn shell script: if "$all_recs" = "ALL"; then commands fi; I keep getting the error syntax error at line 999 : 'then' unmatched. I'm sure it is a minor problem, but have been unable to find any answers online. Any help... (22 Replies)
Discussion started by: akpopa
22 Replies

2. UNIX for Dummies Questions & Answers

combine 2 lines (command & echo)

does anyone know how to combine 2 lines? this is what im playing around with. (filename: online, user name: prml0001, real name: primal) #!/bin/sh who | grep $1 > /dev/null if then grep $1 /etc/passwd | cut -f 5, -d : echo is logged on exit 0 else grep $1... (13 Replies)
Discussion started by: primal
13 Replies

3. Shell Programming and Scripting

How to echo a <tab> space?

I've tried this: echo "${bold}User${norm} : u"\t"${bold}All Users ${norm} : a\t" and i got this output: Specific User : u\tAll User: a\t (14 Replies)
Discussion started by: laila63
14 Replies

4. Shell Programming and Scripting

fi

Does anybody know what is wrong here. I am running centOS the anticrash gives me this. #!/bin/sh while true do rm banme.tmp :> banme.txt /usr/sbin/tcpdump -p -c 100 -n -i eth0 "dst host 66.197.12 6.19 and udp port 7777" >banme.tmp grep "length 0" banme.tmp | cut -f 3 -d " " |... (14 Replies)
Discussion started by: chrisb345
14 Replies

5. Shell Programming and Scripting

How to display and count

Hi there, I'd like to find a way to display a string and count the words in it. supernova:~# echo 'hello world' | tee - | wc Unfortunately, this doesn't work. Any idea? Thanks in advance. Santiago (15 Replies)
Discussion started by: chebarbudo
15 Replies

6. Shell Programming and Scripting

Using Echo

Hi All, Need help in resoving the issue . Can anyone let me know how to get fix length using unix shellscript. For Ex: echo "NUMBER OF RECORDS "${NO_OF_ROWS}"\nFILE CREATION DATE&TIME "${PROD_DT}" output should be : NUMBER OF RECORDS 2546 CREATIN DATE&TIME 2009-12-01 Each... (14 Replies)
Discussion started by: Samtel
14 Replies

7. Shell Programming and Scripting

echo doesn't work right

Hi,when I run my first shell script,I got something that doesn't work right. I wrote this code in the script. echo -e "Hello,World\a\n"But the screen print like this: -e Hello,World The "-e" wasn't supposed to be printed out. Can anyone help me out?:wall: Many thanks!:) (25 Replies)
Discussion started by: Demon
25 Replies

8. Shell Programming and Scripting

Echoing command results

Sorry folks, Second time today. I am working on a script that accepts data via pipe and processes it. I expect it to work as: # command | ProcScript.sh Within ProcScript.sh, I want to be able to give the target of the prev run command I am using history 2 | grep -v history | awk... (18 Replies)
Discussion started by: Marc G
18 Replies

9. Shell Programming and Scripting

Unable to echo the content

Hello, 'echo' command is not printing the exacting content as I needed. I'm trying below, which is not echoing the correct content. echo "XYZ\\`hostname`-volume" >> 123 # cat 123 XYZ Where, It suppose to get # cat 123 XYZ\hostname-volume Please let me know how to resolve. ... (20 Replies)
Discussion started by: pjeedu2247
20 Replies

10. UNIX for Dummies Questions & Answers

What is wrong with: echo $PATH | sed s/:/\\n/g

Hello all! I am on Mac (10.8.4) and my shell tcsh (man says version: Astron 6.17.00). Just to precise my tcsh: echo $LC_CTYPE UTF-8 I want to replace all ':' with a new line, to get all paths on one line. I don't find a way to make my shell accept the "\n" My start was: echo... (17 Replies)
Discussion started by: marek
17 Replies

11. Shell Programming and Scripting

Echoing only once for each subdir

I have a script that runs from this: for i in * ; do (cd $i && echo $i && /test1/execute/testb);done this is testb: for file in `ls *.txt` do if && && && && && ; then echo "NO"; break 1; else echo "it is there" fi done What is happening is that I can get it to run a... (19 Replies)
Discussion started by: newbie2010
19 Replies

12. UNIX for Advanced & Expert Users

A hexdumper using echo only...

Hi guys... Sometime ago I said I was going to attempt an Android project. I got my phone for XMAS and after installing a terminal program I realised how limited the command line is. I do NOT intend to __root__ the phone at this point but I can read and write to certain folders. The biggest... (14 Replies)
Discussion started by: wisecracker
14 Replies

13. Shell Programming and Scripting

Grep echo awk print all output on one line

Hello, I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it. I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies

14. Shell Programming and Scripting

How can i split this.. :)?

hello, :) How can i split this.. :) 10.25.10.2 two octet a=2 b=5 Thank you... (23 Replies)
Discussion started by: networksherlock
23 Replies

15. Shell Programming and Scripting

Echo with loop

Hello i have a file with this format: ip.txt content: 192.168.1.1/2020 192.136.1.2/2028 192.168.1.10/3047 .... need to create 1000 files and each files content, import data from ip.txt line (first file with first line data, second file with second line...etc) internal=yes internalip=... (14 Replies)
Discussion started by: nimafire
14 Replies