Sponsored Content
Top Forums Shell Programming and Scripting Difference between "Command substitution" and "Process substitution" Post 302268287 by Christoph Spohr on Monday 15th of December 2008 10:20:15 AM
Old 12-15-2008
Hi,

$(...) means execute the command ... and print the output
to the command line.
<(...) and =(...) create a temporary file of the output and
redirect the output of this to the command line.

To understand the difference try:

Code:
diff $(ls) $(ls)

and

Code:
diff <(ls) <(ls)

The first will fail as diff expects input from a file.

HTH Chris
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Red Hat

"service" , "process" and " daemon" ?

Friends , Anybody plz tell me what is the basic difference between "service" , "process" and " daemon" ? Waiting for kind reply .. .. (1 Reply)
Discussion started by: shipon_97
1 Replies

3. Shell Programming and Scripting

bash ignores escaped $ and says "bad substitution"

Can someone tell me how to get the version of bash that I am running? I'm running cygwin bash on Windows XP at home and cygwin bash on Vista at work. Is this the version number for bash? $ uname -a CYGWIN_NT-6.0 US-SEA-L3BER9K 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin This is the... (2 Replies)
Discussion started by: siegfried
2 Replies

4. Solaris

difference between "root" and "usr" packages

Hi, could someone pls enlighten me on the difference between the "root" package and "usr" package? Like in this example: pkginfo -l SUNWGtku | grep -i desc DESC: GTK - The GIMP Toolkit (Usr) and pkginfo -l SUNWGtkr | grep -i desc DESC: GTK - The GIMP Toolkit (Root)... (6 Replies)
Discussion started by: masloff
6 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

perl's substitution operator "s" with file contents?

Please show me how to make substitution over the contents of a file in a perl script. In a perl script, the core part of substitution operation is s/FINDPATTERN/REPLACEPATTERN/g; However, I cannot figure out how to make the substitution occur over the contents of a file. The following... (3 Replies)
Discussion started by: LessNux
3 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
PAM_MAKE(8)							 Reference Manual						       PAM_MAKE(8)

NAME
pam_make - PAM module which calls make SYNOPSIS
pam_make.so [debug] [nosetuid] [make=prog] [log=file] /path/ [...] DESCRIPTION
pam_make is a PAM module that can be used to run make in a given directory. OPTIONS
debug Print debug information. log=file The output of make is appended to file nosetuid Per default pam_make.so will execute make with the effective user ID of the calling process. Specifying this option means make is run with the real user ID. make=prog The command prog is used instead of make. MODULE SERVICES PROVIDED
The services auth, account, password and session are supported. RETURN VALUES
PAM_SUCCESS The make command runs successfull. PAM_SERVICE_ERR No argument or a wrong number of arguments were given. PAM_SYSTEM_ERR A system error occured or the make command failed. PAM_IGNORE pam_setcred was called, which does not execute the make command. EXAMPLES
Add the following line to /etc/pam.d/passwd to rebuild the NIS database after each local password change: passwd optional pam_make.so /var/yp This will execute the command: make -C /var/yp HISTORY
The first implementation of pam_make was written by Mihai Ibanescu <misa@dntis.ro>. SEE ALSO
pam.conf(5), pam.d(8), pam(8) AUTHOR
pam_make was written by Thorsten Kukuk <kukuk@thkukuk.de>. Reference Manual 10/25/2006 PAM_MAKE(8)
All times are GMT -4. The time now is 07:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy