10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello... And thanks in advance for any help anyone can offer me on my question! I've been doing a lot of reading to try and find my answer... But I haven't had any luck
What I'm trying to understand is where a child process inherits global environment variables from? I understand the exec()... (2 Replies)
Discussion started by: bodisha
2 Replies
2. 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
3. UNIX for Advanced & Expert Users
Hi,
I need to delete the last N days file using find.
I am trying to use
find . -mtime -10 -print
which lists down required files.
but when i use
find . -mtime -10 -exec ls -lrt {} \;
it gives me all files in the directory including the required files but the required files... (7 Replies)
Discussion started by: v_m1986
7 Replies
4. Shell Programming and Scripting
The following is my bash script
-----------------------
#!/bin/bash
exec myscript "$@"
-----------------------
When invoked, the script "myscript" in the exec command
is using the file "/usr/bin/diff"
But, I want the script "myscript"to use the file "/home/bin/diff"
How can I... (1 Reply)
Discussion started by: bsoo
1 Replies
5. Shell Programming and Scripting
I have a question about the following
what is the difference between running myscript vs . myscript vs exec myscript ?
I know that when you just run myscript it will fork a child process and run the script and exits.
What does the . myscript and exec myscript do and why is it different and... (1 Reply)
Discussion started by: jlim0930
1 Replies
6. Programming
Hello everybody.I want to make clear that i am not going to ask from anybody to build my asignement but i have a big problem. I can't seem to find anywhere ONE good example on C about what i am trying to do:wall:.I think it is simple. All i ask is one example, even a link is fine.
So, i want to... (1 Reply)
Discussion started by: Cuervo
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
on AIX 6.L
I want to copy the result of grep -v to test directory then :
`hostname`@oracle$ls -l | grep -v RINT -exec cp {} test
grep: can't open -exec
grep: can't open cp
grep: can't open {}
test:°`.
Can you help me ?
Thank you. (3 Replies)
Discussion started by: big123456
3 Replies
8. Shell Programming and Scripting
Hi there,
I'm writing a script to restore 3 directories and 3 mysql db's every 24 hours. While writing the script, I came across the thought...
Do I need to pause between executions?
Example:
msql restore1.sql
rm -Rf path1/*
cp -Rf path1/* /restore1
chmod 777 /folder1/cache1
... (2 Replies)
Discussion started by: semiotics101
2 Replies
9. Shell Programming and Scripting
Hi all,
I had an issue regarding use of `` or exec in perl . `` are considered to be unsafe. Why? In my case an user would be giving some parameters as input and I will form an command of it and execute it using ``. It is important to capture output as i have to parse the output. As well as I need... (0 Replies)
Discussion started by: bharadiaam
0 Replies
10. UNIX for Advanced & Expert Users
I have read that exec "replaces the current process with a new one".
So I did
$ exec ls
and after this executed, my shell disappeared. I am assuming that my shell had PID xyz, and when I did exec ls, this ls got pid xyz, and when it terminated, there was no more shell process running, and... (5 Replies)
Discussion started by: JamesByars
5 Replies