10 More Discussions You Might Find Interesting
1. Programming
Hello everyone, this is my first post.
I have a task to use a fork to create multiple processes and then use execlp to run another program to add 2 numbers.
The problem I am having is we are supposed to use the exit() call in the execlp to return the small integer. This is a bad way to... (3 Replies)
Discussion started by: Johnathan_1017
3 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. 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
5. UNIX for Dummies Questions & Answers
int main ()
{ int p=1;
while (p>0)
p=fork();
execlp("prog",prog",Null);
return 0;
}
and thanks :b: (1 Reply)
Discussion started by: foufo07
1 Replies
6. HP-UX
/************************************************************************
*
* TEST NAME: setrlimitd_su.c
*
* PURPOSE: To verify the soft (rlim_cur) and hard (rlim_max) limit
* of process RLIMIT_DATA resources correctly inherited by
* the exec() system call.
*
* RESULT: function call should... (1 Reply)
Discussion started by: mansa
1 Replies
7. 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
8. Programming
Hi, I have a very small program where I call execlp() to execute sort.
Everything works fine. But sort has a -T option which can be used to specify a temporary directory. Now when I use -T with execlp() it does not work.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include... (4 Replies)
Discussion started by: the_learner
4 Replies
9. Shell Programming and Scripting
In exec function say when i would like to remove the files
exec rm{}\;
Why is this "\" needed immediately after {} and what if i dont give it?
TIA,
Nisha (1 Reply)
Discussion started by: Nisha
1 Replies
10. Programming
Hi mates,
Is there any difference between execvp and execlp? any comment will be appreciated.
abdul:) (1 Reply)
Discussion started by: abdul
1 Replies