01-08-2011
I want the errors occured in a script should be appended to the file using exec command.
when i run
, errors are displaying in STDOUT.
I want errors to be appended to a file(say log file).
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
linux redhat 8.0
I am getting accustomed to using the -exec command to get around my databse.. and use it to edit and update files..! is this more apllicable than jumping from one directory to the other.. I have set up the databse so that the inode #'s are accessable and can get me from one... (0 Replies)
Discussion started by: moxxx68
0 Replies
2. Shell Programming and Scripting
im having trouble with the comprehending the exec command and the use of file descriptors.
given:
#!/bin/sh
exec 4>&1
exec 1>&2
exec 2>&4
exec 4>&-
echo Hello
would the standard output of this script be sent to STDOUT, STDERR or neither and why???
thanks for the help. (1 Reply)
Discussion started by: rfourn
1 Replies
3. UNIX for Dummies Questions & Answers
I have a ksh script that contains the following:
find /dir1/dir2 -type f -name "FILE.*" -newer /dir1/dir2/afterme.txt -exec cp /dir1/dir2/dir3 {} \;
When I run it from the cli, it runs fine. When I run it from the ksh script I get
find: missing argument to `-exec'
I also tried -exec cp... (40 Replies)
Discussion started by: bbbngowc
40 Replies
4. Shell Programming and Scripting
Need to close files which descriptor number are larger than 9 in ksh.
'exec 10>&-' fails with 'ksh: 10: not found'. How do you specify file descriptors which occupies two or more digits in ksh script?
Thanks,
Masaki (2 Replies)
Discussion started by: masaki
2 Replies
5. Shell Programming and Scripting
All,
I am using below shell script to output the content to outputfile.txt. What I am looking for is in addition to outputfile.txt, I want the output to be on standard output too.
exec > outputfile.txt
echo "Starting "
echo "ending" (5 Replies)
Discussion started by: basic_shell
5 Replies
6. Shell Programming and Scripting
Hi,
I have the following lines in a script :
.
.
exec < some_file
.
.
.
I have very little idea about exec command. I would like to know what this does and what will happen if the file some_file does not exist. Specifically, I would like to know whether the lines following this... (5 Replies)
Discussion started by: elixir_sinari
5 Replies
7. Shell Programming and Scripting
I have a script (ksh, Linux) which is about 500 lines and this is only a small requirement. Below is an example of my requirement.
FunctionThis(){
echo "You are in this. Goes to log"
}
FunctionThat(){
echo "You are in That. Goes to log"
}
FunctionScreen(){
echo "You are in Screen.... (3 Replies)
Discussion started by: edidataguy
3 Replies
8. UNIX for Dummies Questions & Answers
Hi everyone,
i have a file that I had grep'd from something else lets call it file1.txt which consists variable files and lines due to different scenarios/inputs
1782
9182
fe35
ac67
how can I print this in this manner?
1782,9182,fe35,ac67
also if i had piped the new output... (2 Replies)
Discussion started by: prodigy06
2 Replies
9. Shell Programming and Scripting
I have a shell script, research_dump_sub.sh
the first 3 lines are below. the below two lines writing to log file, i am not finding the log file, how to locate, and what is the exec command doing exactly please.
and the third line again calling/triggering the shell file. i didn't understood.
... (2 Replies)
Discussion started by: cplusplus1
2 Replies
10. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
startfluxbox
STARTFLUXBOX(1) Fluxbox Manual STARTFLUXBOX(1)
NAME
startfluxbox - start a fluxbox session
SYNOPSIS
startfluxbox
DESCRIPTION
startfluxbox is a script which runs the file ~/.fluxbox/startup If it doesn't exist it will be generated.
startfluxbox should be started from your ~/.xinitrc if you use startx, or ~/.xsession if you run a display manager, like xdm.
FILES
~/.fluxbox/startup
This file contains all commands that should be executed before fluxbox is started. The initial file contains helpful comments for
beginners. It also starts fluxbox.
EXAMPLES
The default ~/.fluxbox/startup is as follows:
#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.
# Change your keymap:
xmodmap "$HOME/.Xmodmap"
# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.
exec fluxbox
# or if you want to keep a log:
# exec fluxbox -log "$fluxdir/log"
If you need to start applications after fluxbox, you can change the exec fluxbox line above to something like this:
exec fluxbox &
fbpid=$!
sleep 1
{
xsetroot -cursor_name left_ptr -fg white -bg black &
ipager &
gkrellm2 &
} &
wait $fbpid
So xsetroot, ipager, and gkrellm2 will all be started after fluxbox, after giving fluxbox 1 second to startup.
For more details on what else you can do in this script, see sh(1), or the documentation for your shell.
AUTHORS
The author of startfluxbox(1) is Han Boetes <han at fluxbox.org>
This manpage was converted to asciidoc format by Jim Ramsay <i.am at jimramsay.com> for fluxbox-1.1.2
SEE ALSO
fluxbox(1)
AUTHOR
Jim Ramsay <i.am@jimramsay.com>
Author.
startfluxbox.txt 28 October 2011 STARTFLUXBOX(1)