Sponsored Content
Top Forums UNIX for Dummies Questions & Answers exec command and field descriptors.. Post 58925 by moxxx68 on Saturday 4th of December 2004 04:14:36 PM
Old 12-04-2004
where does :
exec 3
exec 4
exec 5
come into the picture.. ?
so far I have understood the stdout and stderr
but i don't see how this the use of exec or the use of fd 3 can write to a file. or how fd 4 can read stndin and how fd 5 can stdout to tty.. i am not making the connection between the numbers and the exec command basically for 3 to 5.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using the -exec command

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

Help with exec command and file descriptors??

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. Shell Programming and Scripting

Help with exec command and file descriptors II

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

4. Shell Programming and Scripting

exec command

can any one pls explain the meaning of exec 1<&5 ?? its urgent (2 Replies)
Discussion started by: santosh1234
2 Replies

5. HP-UX

exec and file descriptors

Hi, I speak and write english more or less, so I hope my asking be clear. :) In the company I am working, they are using control-m software to lunch shell scripts. So i put this command in all shell scripts: export LOGFILE_tmp=$PRODUC_DATA/tmp/${SCRIPT}_${PAIS}_`date... (0 Replies)
Discussion started by: anamcara
0 Replies

6. UNIX for Dummies Questions & Answers

Exec command

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)
Discussion started by: Sri3001
1 Replies

7. Shell Programming and Scripting

exec command help

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

8. Shell Programming and Scripting

Use 3 descriptors with ssh command

Hi, I want to execute some commands via ssh. errupdate <enter> =5A7598C3: <enter> Report=False <enter> Log=False <enter> <CTRL + D> <CTRL + D> how can i do this ? I suppose i have to use file descriptor but i don't know how ? Thank you (2 Replies)
Discussion started by: khalidou13
2 Replies

9. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

10. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

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
crontab(5)							File Formats Manual							crontab(5)

Name
       crontab - clock daemon table file

Syntax
       /usr/lib/crontab

Description
       The  command  executes  at  specified dates and times according to the instructions in the file. The file consists of lines with six fields
       each.  The format for a line is as follows:

	      minute hour day month weekday command

       The following list defines each field in the line:

       minute (0-59)  The exact minute that the command sequence executes.

       hour (0-23)    The hour of the day that the command sequence executes.

       day (1-31)     The day of the month that the command sequence executes.

       month (1-12)   The month of the year that the command sequence executes.

       weekday (1-7)  The day of the week that the command sequence executes. Monday = 1, Tuesday = 2, and so forth.

       command	      The complete command sequence variable that is to be executed.  Note that the command string must conform  to  Bourne  shell
		      syntax.

       The first five integer fields may be specified as follows:

       o   A single number in the specified range

       o   Two numbers separated by a minus, meaning a range inclusive

       o   A list of numbers separated by commas, meaning any of the numbers

       o   An asterisk meaning all legal values

       The sixth field is a string that is executed by the shell at the specified times.  A percent sign (%) in this field is translated to a new-
       line character.	Only the first line of the command field, up to a percent sign (%) or end of line, is executed by the  shell.	The  other
       lines are made available to the command as standard input.

Examples
       The following example is part of a file:
       # periodic things
       0,15,30,45 * * * * (echo '^M' `date`; echo '') >/dev/console
       0,15,30,45 * * * * /usr/lib/atrun

       # daily stuff
       5 4 * * * sh /usr/adm/newsyslog
       15 4 * * * ( cd /usr/preserve; find . -mtime +7 -a -exec rm -f {} ; )
       20 4 * * * find /usr/msgs -mtime +21 -a ! -perm 444 -a ! -name bounds
	    -a -exec rm -f {} ;

       # NOTE: The above line is wrapped.

       # local cleanups
       30 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name df-exec rm {} ;
       35 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name tf-exec rm {} ;
       40 4 * * * find /usr/spool/rwho -type f -mtime +21 -exec rm {} ;
       #

       # redirecting error output
       0 17 * * 1,3,5 /bin/tar -cv /usr/sysads/smith > /dev/console 2>&1
       #

Files
See Also
       sh(1), cron(8)
       Guide to System Environment Setup

																	crontab(5)
All times are GMT -4. The time now is 07:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy