07-24-2013
Hi,
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
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: alex_5161
2 Replies
2. Shell Programming and Scripting
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)
Discussion started by: aintour
2 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: mrvwman
8 Replies
4. Shell Programming and Scripting
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)
Discussion started by: aksaravanan
13 Replies
5. Solaris
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)
Discussion started by: mk1216
11 Replies
6. Shell Programming and Scripting
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)
Discussion started by: dchoudhury
4 Replies
7. Shell Programming and Scripting
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)
Discussion started by: acarpio89
5 Replies
8. Shell Programming and Scripting
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)
Discussion started by: rafa_fed2
17 Replies
9. Shell Programming and Scripting
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)
Discussion started by: postcd
2 Replies
10. UNIX for Dummies Questions & Answers
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
extutils::command
ExtUtils::Command(3perl) Perl Programmers Reference Guide ExtUtils::Command(3perl)
NAME
ExtUtils::Command - utilities to replace common UNIX commands in Makefiles etc.
SYNOPSIS
perl -MExtUtils::Command -e cat files... > destination
perl -MExtUtils::Command -e mv source... destination
perl -MExtUtils::Command -e cp source... destination
perl -MExtUtils::Command -e touch files...
perl -MExtUtils::Command -e rm_f files...
perl -MExtUtils::Command -e rm_rf directories...
perl -MExtUtils::Command -e mkpath directories...
perl -MExtUtils::Command -e eqtime source destination
perl -MExtUtils::Command -e test_f file
perl -MExtUtils::Command -e test_d directory
perl -MExtUtils::Command -e chmod mode files...
...
DESCRIPTION
The module is used to replace common UNIX commands. In all cases the functions work from @ARGV rather than taking arguments. This makes
them easier to deal with in Makefiles. Call them like this:
perl -MExtUtils::Command -e some_command some files to work on
and NOT like this:
perl -MExtUtils::Command -e 'some_command qw(some files to work on)'
For that use Shell::Command.
Filenames with * and ? will be glob expanded.
FUNCTIONS
cat
cat file ...
Concatenates all files mentioned on command line to STDOUT.
eqtime
eqtime source destination
Sets modified time of destination to that of source.
rm_rf
rm_rf files or directories ...
Removes files and directories - recursively (even if readonly)
rm_f
rm_f file ...
Removes files (even if readonly)
touch
touch file ...
Makes files exist, with current timestamp
mv
mv source_file destination_file
mv source_file source_file destination_dir
Moves source to destination. Multiple sources are allowed if destination is an existing directory.
Returns true if all moves succeeded, false otherwise.
cp
cp source_file destination_file
cp source_file source_file destination_dir
Copies sources to the destination. Multiple sources are allowed if destination is an existing directory.
Returns true if all copies succeeded, false otherwise.
chmod
chmod mode files ...
Sets UNIX like permissions 'mode' on all the files. e.g. 0666
mkpath
mkpath directory ...
Creates directories, including any parent directories.
test_f
test_f file
Tests if a file exists. Exits with 0 if it does, 1 if it does not (ie. shell's idea of true and false).
test_d
test_d directory
Tests if a directory exists. Exits with 0 if it does, 1 if it does not (ie. shell's idea of true and false).
dos2unix
dos2unix files or dirs ...
Converts DOS and OS/2 linefeeds to Unix style recursively.
SEE ALSO
Shell::Command which is these same functions but take arguments normally.
AUTHOR
Nick Ing-Simmons "ni-s@cpan.org"
Maintained by Michael G Schwern "schwern@pobox.com" within the ExtUtils-MakeMaker package and, as a separate CPAN package, by Randy Kobes
"r.kobes@uwinnipeg.ca".
perl v5.14.2 2011-09-19 ExtUtils::Command(3perl)