What does the following exec command do it is in the shell file?
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.
exec [-cl] [-a name] [command [arguments]]
If command is specified, it replaces the shell. No new process is created. . . .
If command is not specified, any redirections take effect in the current shell, and the return status is 0.
As for the redirections: they make use of the shell's "process substitution" (c.f. e.g. man bash) which in turn uses the tee command to both display to stdout and log to the file given.
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)
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)
Hi can some one explain the following command , It would really help if some can really elloborate on what is happening out here
export PATH | exec /bin/sh ./auto_approve :q
P.S: This is the first time i am using exec ,so an elloboration what does it do and what is the use of the :q will be... (1 Reply)
Hi,
I need the data to be appended to the file using exec command in linux.
I am able to add the data to a file using exec command but the file is getting overwritten.
Above exec command is used to overwite in a file.
When I use "exec >>& fileName", getting "syntax error near... (3 Replies)
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)
i have a script where i am reading some lines from a file into another file..
script works fine in bash..
#!/usr/bin/csh
awk 'NR>20&&NR<32' try.sum | awk '{print $4 }' >io
awk 'NR>20&&NR<32' try.sum | awk '{print $9 }' >io1
awk 'NR>20&&NR<32' try.sum | awk '{print $14 }'>io2
exec 10<io... (1 Reply)
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)
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)