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
DH-EXEC-ILLITERATE(1)						      dh-exec						     DH-EXEC-ILLITERATE(1)

NAME
dh-exec-illiterate - Write literate debhelper config files! SYNOPSIS
#! /usr/bin/dh-exec --with=illiterate,subst,install Greetings, my dear reader, and welcome to the awesome world of literate programming! Today, we're going to explore how to write a debhelper install file in a literate manner. Trust me, it's going to be lots and lots of fun! So, what exactly are we trying to accomplish? We're going to try installing a file from `src/this-file' in the source tree, to a multi-arched path in the binary file. Lets say, to `/usr/lib/foo/${DEB_HOST_MULTIARCH}/'. Of course, ${DEB_HOST_MULTIARCH} is a variable, and will be expanded later in the dh-exec pipeline. It'll be something like x86_64-linux-gnu. Furthermore, we want to install all files from the 'usr/lib' directory under debian/tmp. If we were writing an illiteral install file, we'd write this rule as: usr/lib But the above description is much easier to understand, isn't it? We're almost finished! One thing left to do, is to install a script named `rename-me', to `/usr/share/foo/new-name' - we renamed it in the process! DESCRIPTION
The dh-exec-illiterate sub-command, unlike the others, does not serve any particular case, except to serve as a warning to all, that things can be taken to an extreme, even with dh-exec. On the other hand, it is just like the other sub-commands in that it must not be called directly, but through dh-exec(1), which automatically runs all available sub-commands if run bare; or explicitly with dh-exec --with=illiterate. It is a program that will translate its input from pretty much free-form text into something that resembles an install file. At least, that's the only supported output format for now. Everything that's not recognised, will be ignored, and not printed. The recognised constructs are: `source' ... `destination' The first string between a backtick and a single quote will be treated as the source file, the next such string will be the destination. If the destination ends with a slash, dh-exec-illiterate will consider it a directory, otherwise it will output a construct that dh-exec-install can recognise as a rename operation. 'source' A string, without whitespace, between two single quotes is treated as a source, whose destination is unspecified, and is left up to dh_install(1) to figure out. ENVIRONMENT
DH_EXEC_SCRIPTDIR Indicates which directory the command-specific scripts should be sought for. If not specified, scripts will be searched for in /usr/share/dh-exec/. FILES
$DH_EXEC_SCRIPTDIR/dh-exec-illiterate-* The various scripts for the higher-level program. SEE ALSO
debhelper(1), dh-exec(1) AUTHOR
dh-exec-illiterate is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>. 2012-05-03 DH-EXEC-ILLITERATE(1)
All times are GMT -4. The time now is 09:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy