Ah, nice one. I see you are invoking a new shell to perform the command. It's good that doing so only involves a few extra key presses. I'll have to add "sh -c" to my local memory banks ;)
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)
Hi,
Currently I'm working on a lenghty script so I figured it would be useful to create a logfile so that output that is displayed on the users screen is also stored in the log file for later reference...... kinda like the whole point of a log file! Anyway, I was just wondering if there was an... (3 Replies)
Suppose I have a file named a
When I write
cat a>a
The following error message is displayed
cat: a: input file is output file
and my file a is truncated to zero size.
Also the exit status of the last command is 1
Can someone tell me what actually happens when I do so? (1 Reply)
I'm redirecting the output of a command to a logfile, however, if the user is on a terminal I would also like the output to be displayed on the screen.
tar tvf some_tarfile >Logfile
if the user is on a term then have the output to the Logfile and also be displayed on the screen at the same... (2 Replies)
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)
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)
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)
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)
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)
Hi All,
i have below for loop of which i am trying to redirect output in a file:
for i in `/usr/sbin/ifconfig -a | awk '/flags/ {print $1}' | grep -v lo | sed 's/://g'`
do
ifconfig $i dhcp status
done >> /tmp/logfile
but instead the output is appearing as stdout on screen rather than... (12 Replies)
Discussion started by: omkar.jadhav
12 Replies
LEARN ABOUT SUSE
args
args(1) GNU Telephony args(1)NAME
args - manipulate and output command arguments.
SYNOPSIS
args [options] args...
DESCRIPTION
This command is used to manipulate and echo command line arguments to standard out. This can include adding quotes around each argument
passed or a separator, or to output each argument on a separate line. The program source also offers a basic example of how to use shell
argument parsing and localization in ucommon.
OPTIONS --delim=char
Set a deliminator character, such as ',', to use between each argument when outputing arguments.
--directory
If argument is a directory, list directory contents as arguments.
--follow
If argument is a directory and a symlink, follow symlinks recursively.
--lines
Output each argument on a separate line.
--quote=char|pair
Set a quote or special leading and trailing pair of characters to surround each argument with when output. A typical use might be
--quote=() to surround arguments in parenthesis.
--recursive
If argument is a directory, recursively scan directory and any subdirectory contents as arguments.
--reverse
Reverse order of arguments.
--help Outputs help screen for the user.
AUTHOR
args was written by David Sugar <dyfet@gnutelephony.org>.
REPORTING BUGS
Report bugs to bug-commoncpp@gnu.org.
COPYRIGHT
Copyright (C) 2009 David Sugar, Tycho Softworks.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
GNU uCommon January 2010 args(1)