06-14-2013
- A log file with one line per background process is nice, as you can grep or count the tightly structured records.
- But file per process in the background in a dedicated directory is the most popular.
- I often set processes like these in a tree of pipes, using both | and <() and occasionally >() to tie all the processes together. This ensures no latency to speak of and no polling. When the process ends, it closes stdout and that releases the reading process.
This User Gave Thanks to DGPickett For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can I run a shell in the background?
cat test.sh
#!/bin/sh
sleep 600
Thank u very much indeed! (2 Replies)
Discussion started by: GCTEII
2 Replies
2. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
3. Shell Programming and Scripting
I have a following program:
echofunc()
{
filename=$1
echo "reading $filename"
while read line
do
echo $line;
sleep 6;
done < $filename
}
split -5 new.dat
ls x* > input.dat
while read file
do
echofun $file &
done < input.dat (3 Replies)
Discussion started by: dhieraj
3 Replies
4. Shell Programming and Scripting
I am trying to write a script that will ssh into a remote machine and recurse through a specified directory, find mp3 files which may be two or three directories deep (think iTunes: music/artist/album/song.mp3), and scp them back to the machine running the script. The script should also maintain... (3 Replies)
Discussion started by: johnnybg00de
3 Replies
5. Shell Programming and Scripting
hello there,
there's a function, in my shell script, i'd like to run in the background.
here's an example:
log()
{
local SELF=${0##*/}
tty -s && echo ": $*"
}
some_func()
{
# do something
log "This text is not displayed in the terminal's output when running in the... (1 Reply)
Discussion started by: Shedon
1 Replies
6. Shell Programming and Scripting
Dear All,
I am trying to run a script in background like ./scriptname.sh & but when i try to run it in background it is giving me an error "syntax error at line 12: `(' unexpected" at the line 12, there is a function definition
"function getFileList()".
This script runs fine if i run on... (2 Replies)
Discussion started by: bilalghazi
2 Replies
7. Shell Programming and Scripting
I have written the below query to genrate a telephone.I am passing account number from oracle database.
I am calling 2 scripts which generate the bill
1. bip.sh (it runs in the background)
2.runXitInvoice_PROFORMA_integ
bip.sh generates a number which runXitInvoice_PROFORMA_integ
uses.How... (7 Replies)
Discussion started by: rafa_fed2
7 Replies
8. UNIX for Beginners Questions & Answers
Hi Guys,
i am having a script which checks for ip address is pingable or not,when i execute this script in terminal it keeps on showing the pinging status of every ip address and it takes more time when i check for 100 ip address,How to do run a script in background without showing in the terminal... (4 Replies)
Discussion started by: Meeran Rizvi
4 Replies
9. Shell Programming and Scripting
Hello,
I have a requirement to apply hashing algorithm on flat file on one or more columns dynamically based on header
sample input file
ID|NAME|AGE|GENDER
10|ABC|30|M
20|DEF|20|F
say if i want multiple columns based on the header example id,name or id,age or name,gender and hash and... (13 Replies)
Discussion started by: mkathi
13 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table.
Can you please suggest why? or any better idea?
export FILE="/abc/autom/file/geo_JOB.csv"
Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
LEARN ABOUT DEBIAN
pslist
PSLIST(1) BSD General Commands Manual PSLIST(1)
NAME
pslist -- control processes and their descendants
SYNOPSIS
pslist [pid/name...]
pslist -h | --help
pslist -v | --version
rkill [-SIG] pid/name...
rrenice [+/-]pri pid/name...
DESCRIPTION
The pslist utility examines the list of current processes to find a specified process and all its descendants. A process may be specified
either by name or by process ID. If no arguments are given, pslist displays a list of the whole process tree. For each process specified on
the command line, pslist outputs a line containing the process ID, the command name, and the PIDs of all the descendants (and their descen-
dants, etc.).
When invoked as rkill, this utility does not display information about the processes, but sends them all a signal instead. If not specified
on the command line, a terminate (SIGTERM) signal is sent.
When invoked as rrenice, this utility does not display information about the processes, but attempts to set their nice value instead.
RETURN VALUES
The pslist utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
pgrep(1), pkill(1)
HISTORY
The pslist utility was written by Peter Pentchev in 2000.
AUTHORS
Peter Penchev <roam@ringlet.net>
BSD
June 1, 2009 BSD