It copys one specified file to multiple "unique"(filter those different pathnames which in fact point to the same physical path) paths with parallelism in bash. In contrast to sequential copy processes, it performs well under multiprocessor systems.
The efficiency of Co-process is normally determined by three factors:
1.Whether CPU bound or not
2.Whether scientific data processing or not
3.Whether I/O or not
Welcome to www.linuxsir.org/bbs : )
Last edited by home_king; 04-18-2004 at 10:16 AM..
Originally posted by home_king Well, it's the typical way to make "co-process" in Bash, isn't it?
Well no, not at all. Here is the bash FAQ which is being maintained by the author of bash. According to bash's author, the recommended technique is "named pipe pairs (one for read, one for write)". Naturally, there would also be a process connected to the named pipes.
Originally posted by Perderabo Well no, not at all. Here is the bash FAQ which is being maintained by the author of bash. According to bash's author, the recommended technique is "named pipe pairs (one for read, one for write)". Naturally, there would also be a process connected to the named pipes.
It is never said that "daemon+wait" is the only way to make "Co-process" in Bash, but the typical way.
What's more, conceptly, "named pipe" is different from "Co-process". The former depends some command's position parameters. Strictly speaking, it is called "Process Substitution".
Have a look at my example:
This commnad bound the input of gzip process with the first parameter(also tar's output destination) of tar process.
Another example:
It's not "Co-process"!
It's not the case that "named pipe pair"! The number of named pipes is restricted by the number of appropriate position parameters.
Please refer to ¡¶Learning the bash shell¡·of O'reilly.
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)
I've found this script part on the stackoverflow:
if ; then
sudo bash "$0" "$@";
exit "$?";
fi
I realized that sudo bash "$0" "$@"; is the only needed for me.
But the strange thing happens when I move this line outside the IF statement:
sudo bash "$0" "$@"; stops the... (9 Replies)
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)
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
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)
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)
Hi,
I have a process that can be seen after "ps aux" command.
However when I do "top" command. This process
cannot be seen.
How can this happen? Is there anything wrong
with my code? (3 Replies)