10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Folks -
Is there a way to add two execs to one script? For instance, I need to redirect the stdout and stderr to two separate directories. I want to do this:
#::-- Direct STDOUT and STDERROR to repositories --::#
exec 2>"${_ERRORFILE}" > "${_LOGFILE}"
exec 2>"/new/path/file.err" >... (7 Replies)
Discussion started by: SIMMS7400
7 Replies
2. Shell Programming and Scripting
Hi All,
I'm new in forum.
Many congratulations to everyone for all work.
I'm not an expert in bash script
I've a problem with a sh file.
The sh file run every t minuts and it read data from txt file and then compile form.
Finally, the user, from the web browser click on send.
The script... (0 Replies)
Discussion started by: Herbert
0 Replies
3. Shell Programming and Scripting
Guru's,
I want to make a use of "exec" command in my script and want to check return code of executing script, but as you know exec command will terminate current processID and comeout and will trigger new one, i am unable to check return code of script and not able to run a scrpit after exec. ... (2 Replies)
Discussion started by: pawar.atul28
2 Replies
4. Shell Programming and Scripting
I have the following bash script lines in a file named test.sh.
#!/bin/bash
#
# Write Date to cron.log
#
echo "Begin SSI Load $(date +%d%b%y_%T)"
#
# Get the latest rates file for processing.
#
d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1)
filename=$d
export filename... (3 Replies)
Discussion started by: ginowms
3 Replies
5. Shell Programming and Scripting
Hi, Gurus,
my script code as following:
#!/usr/bin/sh
mkdir dir1
result=`echo $?`
if ; then
echo "completed"
else
echo "wrong"
fi
When I execute it with command sh filename. , it executed successfully.
but, when I execute it with command . filename it throw out error:
-bash:ELF :... (2 Replies)
Discussion started by: ken002
2 Replies
6. Shell Programming and Scripting
Hi,
I discovered the following single-line script works very well to cp a large number of files from a source directory to a destination directory while avoiding the "argument list too large" error:
# cpmany - copy large number of files
# Takes two parameters - source dir, destination dir... (14 Replies)
Discussion started by: Tanuka
14 Replies
7. Shell Programming and Scripting
Hello,
Can I pass a database handle created in parent script to a child script triggered using exec ??
Parent script
=========
$dbh =DBI->connect{......); # Db handle creation
$param1 =10; # parameter one
exec "childscript.pl $param1 $dbh "; # executing childscript.pl with two parameters... (0 Replies)
Discussion started by: coolbhai
0 Replies
8. Shell Programming and Scripting
Hi,
With a awk script i create a "adduser line"
$ cat /tmp/tmp.ldif | awk -f ldif2adduser.awk
adduser --uid 1002 --gid 1000 --gecos "ROUSSIN Guy" --home /homeL/guy --shell /bin/bash --disabled-password guy
If i cut and paste this line, all is fine. But in a shell script i get errors :
... (2 Replies)
Discussion started by: guyr
2 Replies
9. Shell Programming and Scripting
Hi everyone,
I've been racking my brains for ages on this and need your help/advice.
I am writing a script that is reading in file to process and putting them into a temporary file. The loop starts and the script gets the first file name, does what i needs to do (copy it) and then returns to... (2 Replies)
Discussion started by: Angoss
2 Replies
10. UNIX for Dummies Questions & Answers
What is the difference between sourcing a script, running it or execing it? (1 Reply)
Discussion started by: 98_1LE
1 Replies