Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Difference between xargs and exec Post 73998 by vibhor_agarwali on Tuesday 7th of June 2005 07:51:19 AM
Old 06-07-2005
Thanks,

Any idea about finding out whether my find in Gnu one or not.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

difference between source, exec and ./script

What is the difference between sourcing a script, running it or execing it? (1 Reply)
Discussion started by: 98_1LE
1 Replies

2. Shell Programming and Scripting

MV files with xargs or -exec

Hi I need to move multiple (say 10 files) from one location to another location. My selection would be like this... ls -ltr *.arc | head ---> Need to move top 10 files with single command without iterating in loop. I know we can move files like this with find command but not sure if I can... (4 Replies)
Discussion started by: malaymaru
4 Replies

3. Shell Programming and Scripting

String substitution on find results inside exec/xargs

What I'm trying to do is perform a copy, well a ditto actually, on the results of a find command, but some inline string substitution needs to happen. So if I run this code find ./ -name "*.tif" I get back these results. .//1234567.tif .//abcdefg.tif Now the action from exec or xargs I... (2 Replies)
Discussion started by: myndcraft
2 Replies

4. AIX

Difference in Using xargs

Hi , Can somebody explain what is the difference in the below commands.. when using Xargs its giving all the hidden files and is it something xargs will do recursive searching or parsing ? find . -type f -links 1 | xargs ls -li find . -type f -links 1 | ls -li (1 Reply)
Discussion started by: Karthikeyan K
1 Replies

5. Shell Programming and Scripting

Difference between using xargs and backticks

Hey all. Just a fast question, what is the technical difference between using back ticks and using xargs to perform a command? Here's an example Find /mydir -name *.conf |xargs rm Vs Rm 'find /mydir -name *.conf' Is there a performance hit? I know they do the same thing but which is... (1 Reply)
Discussion started by: msarro
1 Replies

6. Programming

difference bewteen pipe, xargs, and exec

I have read several docs on these on the web and looked at examples. I can't figure out the difference. In some cases you use one or the other or you combine them. can someone help me understand this? (1 Reply)
Discussion started by: guessingo
1 Replies

7. Shell Programming and Scripting

Script Variables Inquiry, Values Okay in Standalone Exec, No-Show in Cron Exec

I have the following bash script lines in a file named test.sh. #!/bin/bash # # Write Date to cron.log # echo "Begin SSI Load $(date +%d%b%y_%T)" # # Get the latest rates file for processing. # d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1) filename=$d export filename... (3 Replies)
Discussion started by: ginowms
3 Replies

8. Shell Programming and Scripting

xargs vs exec with find:

Hi All, i'm trying to create a tar of all the .txt files i find in my dir . I've used xargs to acheive this but i wanted to do this with exec and looks like it only archives the last file it finds . can some one advice what's wrong here : find . -type f -name "*.txt" -print0 | xargs -0... (9 Replies)
Discussion started by: Irishboy24
9 Replies

9. Shell Programming and Scripting

Difference b/w xargs and "-exec" in Find

Hi, What is the difference between the following commands find . -type f -exec grep 'abc' {} \; and find . -type f | xargs grep 'abc' Appreciate your help. (2 Replies)
Discussion started by: bobbygsk
2 Replies

10. Shell Programming and Scripting

Exec and xargs mvoe file to directory

Hello, I am trying to move all the file listed by below command to /tmp/testing directory find ./ -maxdepth 1 -type f -mtime +3 I tried using -exec and xargs - none of the combination is working? Please, help (3 Replies)
Discussion started by: saurabh84g
3 Replies
DH-EXEC(1)							      dh-exec								DH-EXEC(1)

NAME
dh-exec - Debhelper executable file helpers SYNOPSIS
#! /usr/bin/dh-exec src/libfoo-*.so.* debian/foo-plugins/usr/lib/foo/${DEB_HOST_MULTIARCH}/ etc/example.conf => debian/foo/etc/foo/foo.conf DESCRIPTION
dh-exec is a simple program, meant to be used as the interpreter for executable debhelper config files. It is a wrapper around the various other sub-commands (see below), and will pipe the input file through all of them in turn, using an ordering that makes most sense in the vast majority of cases. The order as of now is dh-exec-subst gets run first, followed by dh-exec-install, so that variable expansion happens before files need to be copied. ARCHITECTURE
dh-exec is built up from three layers: there is the dh-exec utility, its single entry point, the only thing one will need to call. Below that, there are the various sub-commands, such as dh-exec-subst, dh-exec-installs and dh-exec-illiterate, which are thin wrappers around the various dh-exec scripts, that make sure they only run those that need to be run. And the lowest layer are the various scripts that do the actual work. One can control which sub-commands to run, or if even more granularity is desired, one can limit which scripts shall be run, too. See below for the options! OPTIONS
--with=command[,command ...] Replace the list of sub-commands to run the input through with a custom list (where entries are separated by whitespace or commas). This option will always replace the existing list with whatever is specified. This can be used to explicitly set which sub-commands to use. The list must not include the dh-exec- prefix. Defaults to subst,install. --without=command[,command ...] Inversely to the option above, this lists all the sub-commands which should not be used. The list must not include the dh-exec- prefix. --with-scripts=script[,script ...] Replace the list of scripts to run the input through with a custom list (where entries are separated by whitespace or commas). This option will always replace the existing list with whatever is specified. This can be used to explicitly specify which scripts to use, limiting even beyond what the --with option is capable of. The list must not include the dh-exec- prefix. By default it is empty, meaning there is no filtering done, and whatever scripts the sub-commands find, will be run. --no-act Do not really do anything, but print the pipeline that would have been run instead. --list List the available sub-commands and scripts, grouped by sub-command. --help, --version Display a short help or the package version, respectively. SUB-COMMANDS dh-exec-subst Substitutes various variables (either from the environment, or from dpkg-architecture(1)). dh-exec-install An extension to dh_install(1), that supports renaming files during the copy process, using a special syntax. ENVIRONMENT
DH_EXEC_LIBDIR The directory in which the wrapped sub-commands reside. Defaults to /usr/lib/dh-exec/. DH_EXEC_SCRIPTDIR The directory in which the scripts that do the heavy work live. Defaults to /usr/share/dh-exec/. FILES
$DH_EXEC_LIBDIR/dh-exec-* The various sub-commands. $DH_EXEC_SCRIPTDIR/dh-exec-* The various scripts ran by the sub-commands. SEE ALSO
debhelper(1), dh-exec-subst(1), dh-exec-install(1) AUTHOR
dh-exec is copyright (C) 2011-2012 by Gergely Nagy <algernon@madhouse-project.org>. 2012-05-03 DH-EXEC(1)
All times are GMT -4. The time now is 07:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy