10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm having a strange problem with basic >& output redirection to a simple log file in csh. When I run this particular output redirection on the command line, it works, but then when I run the same output redirection command >& in my c shell script, I get a blank log file. Nothing is output to the... (5 Replies)
Discussion started by: silencio
5 Replies
2. Shell Programming and Scripting
I am running tcsh/csh shell on my machine. lately i have realized my stderr file redirection is not working.
Please find the terminal logs as below:
>echo b c >>& log
>cat log
b c
>echo $a b c >>& log
a: Undefined variable.
>cat log
b c
I have never faced such issues, hence not sure... (5 Replies)
Discussion started by: animesharma
5 Replies
3. Shell Programming and Scripting
Hi all,
can someone help me with the next redirection?
i want to redirect the stdout+stderr of a command to the same file (this i can do by prog &> file)
but in addition i want to redirect only the stderr to a different file.
how can i do this please? (in BASH)
thanks. (4 Replies)
Discussion started by: eee
4 Replies
4. Shell Programming and Scripting
Hello all,
I have a for loop executing in a script that I want to redirect STDOUT to screen and to file, while directing STDERR to the bit bucket. Here is the general sentax of what I'm doing:
for i in thingy
do
some_command ${i}
done 1>&1 | tee ${LOGFILE} 2> /dev/null
What I am... (2 Replies)
Discussion started by: LinuxRacr
2 Replies
5. Shell Programming and Scripting
I am trying to use one global declaration --> "exec 2>$ERR" to capture all stderr outputs that may occur anywhere in my script.
Then close it at the end of the script using --> "exec 2<&-"
I am using KSH on Solaris 8.
KSH Version M-11/16/88i
If I comment two "exec .." statements in the... (11 Replies)
Discussion started by: kchinnam
11 Replies
6. Shell Programming and Scripting
I have a csh script which I am using to run a program
set data = $argv
set inmod = $argv
set nxz = $argv
# Remove the file extension .pmod
set data = ` echo $data | awk 'BEGIN { FS=".dat" } { print $1 }' `
set inmod = ` echo $inmod | awk 'BEGIN { FS=".vmod" } { print... (8 Replies)
Discussion started by: kristinu
8 Replies
7. Shell Programming and Scripting
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies
8. Shell Programming and Scripting
Hello all
im trying to use top program in my csh shell
like this :
set topResult = `top | grep server.exe`
but im facing 2 problems
1.when the top program dont installed in the machine im getting error
so can i check in csh if application im using exist
2 the top program gives... (2 Replies)
Discussion started by: umen
2 Replies
9. UNIX for Dummies Questions & Answers
Does anyone know away of redirecting the stderr for a bourne or korn shell script to a file. (5 Replies)
Discussion started by: blakmk
5 Replies
10. Shell Programming and Scripting
Man pages....look at the man pages. If you don't have them, you can find them on-line. Read them when you have nothing better to do. Find new commands and new ways of doing things.
The answer:
The only way to direct the standard output and standard
error separately is by invoking... (0 Replies)
Discussion started by: thehoghunter
0 Replies
SURFRAW-UPDATE-PATH(1) User Contributed Perl Documentation SURFRAW-UPDATE-PATH(1)
NAME
surfraw-update-path - updates PATH in shell config files
SYNOPSIS
surfraw-update-path [-add] [-remove] [-check] [-sys] [-all] [-help] [-shell=SHELL]
DESCRIPTION
surfraw-update-path adds the surfraw elvi directory (/usr/lib/surfraw) to your PATH in your shell's config file.
Currently it supports bash, sh, csh, tcsh, ash, dash, ksh, pdksh, zsh, rc, and es
Don't forget to login again or source your login files for it to take effect.
OPTIONS
-check
Checks to see if the surfraw config code is present. This is the default.
-add
Adds the surfraw config code.
-remove
Removes the surfraw config code
-sys
Updates the system-wide shell config instead of the user. Must be done as root.
-shell=SHELL
Selects the shell to configure. Defaults to the value of the $SHELL environment variable.
Currently supported shells are:
sh, ash, bash, dash, csh, tcsh, ksh, pdksh, zsh, rc, and es.
-all
Attempts to configure the startup files for all known shells
-help
Gives a usage message
RETURN VALUE
-check returns 0 if the surfraw code is present in the file, 1 if it is not found, or 2 on error.
All other options return 0 on success, or 2 on error.
ENVIRONMENT
SHELL
Used to determine which shell to configure, if -shell is not given.
HOME
Used to find users config files.
ENV Used by posix-compliant shells to specify a startup rc file.
ZDOTDIR
Used to find user config files for zsh. If not set, defaults to HOME.
SEE ALSO
surfraw(1), sh(1), ash(1), bash(1), dash(1), csh(1), tcsh(1), ksh(1), pdksh(1), zsh(1), rc(1), es(1)
AUTHOR
Ian Beckwith <ianb@erislabs.net>
perl v5.12.4 2011-07-12 SURFRAW-UPDATE-PATH(1)