Thank you for your reply. This was also my understanding. I am not running the first process in background. However, I get the error intermittently that file does not exist. Hence, I wanted to confirm.
Thanks once again for your confirmation.
Angshuman
The error will occur when your command to create that file wont find any patterns which you are searching in the file thus no tempfile gets generated.
Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.
Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)
I need to start a background process, witch will be waiting... (2 Replies)
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
When running a command using the >(cmd) syntax in bash how do you wait for the command to complete before moving on in your script?
Here is a simple example:
zcat largefile.gz | tee >(wc && echo “HELLO”) > /dev/null
# I tried wait, here but it doesn't wait for the process in the subshell.... (8 Replies)
HI,
I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging.
here is the core of the script
CFG_FILE=tab25.cfg
sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c
do
#echo "jobs output"
#jobs
#echo "jobs... (13 Replies)
Hi,
When I query using ps -ef, the complete command is not displayed and is truncated.
Can you please tell me a method to resolve this ?
I have tried the below.
ps -ef | cat
ps -ef | grep imp >/tmp/t1.txt
/usr/ucb/ps -auxw
pargs <pid>
/usr/ucb/ps -aefyl | grep imp
Thanks (11 Replies)
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
I have the following ksh script:
sqlplus usr1/pw1@DB1 @$DIR/a.sql $1 &
sqlplus usr2/pw2@DB2 @$DIR/b.sql $1 &
wait
echo "Done!"
Where $DIR is a variable with the absolute path where a.sql and b.sql are.
For some time, I've been running this script daily and it works fine. The intentions is... (5 Replies)
Let's say I start process A.sh, then start process B.sh. I call both of them in my C.sh
How can I make sure that B starts its execution only after A.sh finishes.
I have to do this in loop.Execution time of A.sh may vary everytime.
It is a parameterized script. (17 Replies)
Hello,
im having bash script with
while ***
command1 &&
command2 &&
command3 &&
done
i want to ask how i can prevent overloading server, by waiting untill all commands complete? any low resources intensive command like "wait" - i dont know if exist? (2 Replies)
Hi everyone
I have a problem with my script
If I try directly this command
/usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
It works
But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
LEARN ABOUT DEBIAN
jifty::manual::style
Jifty::Manual::Style(3pm) User Contributed Perl Documentation Jifty::Manual::Style(3pm)NAME
Jifty::Manual::Style - Jifty coding style guide
Default style
When in doubt, default to whatever Damian Conway's Perl Best Practices says.
Private documentation
When documenting a private method, or providing documentation which is not useful to the user of the module (and is presumably useful to
the developer), wrap it in =begin/end private. This way it does not show up in perldoc where a user would see it and yet is still
available and well formatted (that is, not just a lump comment) when looking at the code.
=begin private
=head2 import_extra
Called by L<Test::More>'s C<import> code when L<Jifty::Test> is first
C<use>'d, it calls L</setup>, and asks Test::More to export its
symbols to the namespace that C<use>'d this one.
=end private
sub import_extra {
...
}
Test temp files
Files created by tests should be declared as such using Jifty::Test->test_file() so they are cleaned up on a successful test run.
Use Shell::Command
Shell::Command has a number of functions which work like common shell file commands such as "touch", "cp" and "mv". They are battle tested
and cross-platform. Use them instead of coding your own.
For example, instead of this:
open my $file, ">foo";
close $file;
Do this:
use Shell::Command;
touch $file;
Case insensitive matching
To check if a string equals another string case insensitively, do this
lc $foo eq lc $bar;
lc $foo eq 'bar';
not this:
$foo =~ /^Q$barE/i;
$foo =~ /^bar$/i;
perl v5.14.2 2010-12-08 Jifty::Manual::Style(3pm)