11-01-2006
piping output to echo
Hi,
I was wondering why ls * | echo does not print the contents of the directory to the screen? The way I see it, ls * returns a whole lot of information, and then we pipe all this info to echo, so surely it should all come to our screen!
Is there a serious flaw in my understanding?
Thanks.
A
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. Im using cat to output the contents of a file, then piping it to my while read loop.In this loop variables get assigned values. However when i try to use the variables outside the loop their values has been reset.I understand about subshells etc. but I have no idea how to "preserve" the... (3 Replies)
Discussion started by: Ultimodiablo
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I did not understand why the following did not work out as I expected:
find . -name "pqp.txt" | grep -v "Permission"
I thought I would be able to catch whichever paths containing my pqp.txt file without receiving the display of messages such as "find: cannot access... Permisson... (1 Reply)
Discussion started by: 435 Gavea
1 Replies
3. Shell Programming and Scripting
Hi All...
Does anyone know how to pipe the output of a "select" statement from a call to Oracle to a file?
ANy ideas woule be greatly appreciated!
Code is as below...
echo "producing CSV file 2..."
sqlplus -s $username/$password@$database<<EOF
set serveroutput on size 1000000
set... (13 Replies)
Discussion started by: satnamx
13 Replies
4. Shell Programming and Scripting
Hi.
I have a script like so:
#!/bin/bash
download='php /var/www/last.php'
echo $download
if $downloadHow do I pipe the output of the php file into a variable, as when i run the if statement, it just echos the file output to the screen and does not actually consider the output (it will be... (2 Replies)
Discussion started by: daydreamer
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have heard you can use the echo command and piping together and was wondering if you can help me out.
I want to be able to use the echo command and pipe together to tell me how many files are in my current working directory, which have only my username read, write and execute... (4 Replies)
Discussion started by: rushhour
4 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to convert the below Csh code into Perl.
But i have the following error.
Can any expert help ?
Error:
ls: *tac: No such file or directory
Csh
set $ST_file = `ls -rt *$testid*st*|tail -1`;
Perl
my $ST_file = `ls -rt *$testid*st*|tail -1`; (10 Replies)
Discussion started by: Raynon
10 Replies
7. Shell Programming and Scripting
I am trying to have a script run without interaction from the command line. So in my script i have a line like this
echo -e "\n\n\ny\ny\n" | ./script
the goal being the ability to mimic 3 Enter presses and 2 'y/n' responses with 'y' followed by enter.
For some reason tho, it is not... (1 Reply)
Discussion started by: mcdef
1 Replies
8. Shell Programming and Scripting
Hi all. I am using procmail to deliver an email to a script I am developing. Procmail delivers the email to the script on standard input. I imagine this is the same as piping input from a command into the script. Hence I've been testing my script by running
echo 'test' | sms-autosend-backup.sh
... (2 Replies)
Discussion started by: akindo
2 Replies
9. Shell Programming and Scripting
Ok, so there is a perl script that runs as a server, on my local host. It tells me which port to use. I want to pipe that output into my browser so I can do the whole thing with a single command. The problem is, I think, that the program doesn't actually exit cause it's running a server, so...... (6 Replies)
Discussion started by: ninjaaron
6 Replies
10. Shell Programming and Scripting
Basically I was wondering if any of you know how to pipe the output of ls to a text file? so in my shell script one of the lines is ls but i want to pipe it into a file called directory listing.
Cheers.
I have tried ls | Directorylisting.txt
but it keeps saying " line 7: DirectoryListing.txt:... (9 Replies)
Discussion started by: LinuxNubBrah
9 Replies
LEARN ABOUT OPENSOLARIS
echo
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.11 5 Jun 2002 echo(3XCURSES)