10-31-2008
MYCMD="ls -l"
$MYCMD > dirlist.txt
Last edited by Bandit390; 10-31-2008 at 11:58 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Is is possible to redirect stdout to a file as well as to the console/screen or display in ksh.
any thoughts suggestions/input is appreciated. Thanks. (2 Replies)
Discussion started by: jerardfjay
2 Replies
2. Shell Programming and Scripting
while running a user inter-active program
how can we get the commands from a
file instead of the user?
is there anyway to permanently redirect content
of a file to standard input? (6 Replies)
Discussion started by: gfhgfnhhn
6 Replies
3. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
4. Shell Programming and Scripting
Hi there
I have a script that runs but it outputs everything onto the screen instead of a file.
I've tried using the > outputfile.txt however all it does is dump the output to the screen and creates an outputfile.txt but doesn't put anything in that file.
Any help would be appreciated
... (6 Replies)
Discussion started by: kma07
6 Replies
5. Shell Programming and Scripting
We have an application here that does some table queries and then prints the result on screen. I do not have the code of this application (which i will just call "queryCommand"), but what it does is that you call it with some parameters and it prints some info about the query and then the... (5 Replies)
Discussion started by: jolateh
5 Replies
6. UNIX for Dummies Questions & Answers
Hello i am trying to write a script that will redirect the output to a certain file. Here is the code so far:
#!/bin/bash
ps -e | sort | more > psfile
When I execute the script nothing happens since i assume the output was redirected to the file called psfile. When I try to look at the... (1 Reply)
Discussion started by: mfruiz34
1 Replies
7. Shell Programming and Scripting
Hi
I am making a script where i want to redirect the output of ls -l to a file
Example
#ls -l fil1.txt > /opt/temp/a.txt
ac: No such file or directory
I want to capture output of this command
like here output is
ac: No such file or directory
can anyone help (4 Replies)
Discussion started by: anish19
4 Replies
8. Shell Programming and Scripting
Hi all
I was wondering if there was a slicker way of doing this without the file -
awk '{print $2}' FS=":" "${FILE}" > "${TMPFILE}"
{
read M_GRP_ID || m_fail 1 "Error: Read failed 1 (${FUNCNAME})"
read M_GRP_WAIT || m_fail 1 "Error: Read failed 2 (${FUNCNAME})"
}... (6 Replies)
Discussion started by: steadyonabix
6 Replies
9. Red Hat
I ran the following command.
cat abc.c > abc.c
I got message the following message from command cat:
cat: abc.c : input file is same as the output file
How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies
10. UNIX for Dummies Questions & Answers
Hello All,
I have the below script and output.
cat test.sh
#!/bin/bash -x
logit()
{
echo " - ${*}" > ${LOG_FILE}
}
LOG_FILE=/home/infrmtca/bin/findtest.log
VAR=`find . -type f -name "*sql"`
logit $VAR
Output:
cat /home/infrmtca/bin/findtest.log
-... (9 Replies)
Discussion started by: Ariean
9 Replies
LEARN ABOUT OSX
pod2usage5.12
POD2USAGE(1) Perl Programmers Reference Guide POD2USAGE(1)
NAME
pod2usage - print usage messages from embedded pod docs in files
SYNOPSIS
pod2usage [-help] [-man] [-exit exitval] [-output outfile] [-verbose level] [-pathlist dirlist] file
OPTIONS AND ARGUMENTS
-help Print a brief help message and exit.
-man Print this command's manual page and exit.
-exit exitval
The exit status value to return.
-output outfile
The output file to print to. If the special names "-" or ">&1" or ">&STDOUT" are used then standard output is used. If ">&2" or
">&STDERR" is used then standard error is used.
-verbose level
The desired level of verbosity to use:
1 : print SYNOPSIS only
2 : print SYNOPSIS sections and any OPTIONS/ARGUMENTS sections
3 : print the entire manpage (similar to running pod2text)
-pathlist dirlist
Specifies one or more directories to search for the input file if it was not supplied with an absolute path. Each directory path in
the given list should be separated by a ':' on Unix (';' on MSWin32 and DOS).
file The pathname of a file containing pod documentation to be output in usage message format (defaults to standard input).
DESCRIPTION
pod2usage will read the given input file looking for pod documentation and will print the corresponding usage message. If no input file is
specified then standard input is read.
pod2usage invokes the pod2usage() function in the Pod::Usage module. Please see "pod2usage()" in Pod::Usage.
SEE ALSO
Pod::Usage, pod2text(1)
AUTHOR
Please report bugs using <http://rt.cpan.org>.
Brad Appleton <bradapp@enteract.com>
Based on code for pod2text(1) written by Tom Christiansen <tchrist@mox.perl.com>
perl v5.12.5 2013-08-25 POD2USAGE(1)