I am doing a project for the university and I have to do that a process has to create several children through fork(). The father process sends a pathname to each one through exec and the children must send to the father a list with the files from each directory.
The father is waiting and the children don't send anything. I must to do the pipe with mkfifo. I am trying to send text from the children but nothing happens. This is the code that I have wroten:
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)
Gurus,
I did my research (on google, this site and my local library) but I am *still* lost. I am trying to teach myself about `named pipes` playing around with MKFIFO (Why not?).
(1) It seems MKNOD is reserved to ROOT whereas MKFIFO is accessible to all users. Am I correct? If the answer is... (20 Replies)
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)
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)
Hello guys!
I am doing a project for the university and I have to do that a process has to create several children through fork(). The father process sends a pathname to each one through exec and the children must send to the father a list with the files from each directory.
The father... (1 Reply)
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)
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)
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
LEARN ABOUT DEBIAN
gedcom::individual
Gedcom::Individual(3pm) User Contributed Perl Documentation Gedcom::Individual(3pm)NAME
Gedcom::Individual - a module to manipulate Gedcom individuals
Version 1.16 - 24th April 2009
SYNOPSIS
use Gedcom::Individual;
my $name = $i->name;
my @rel = $i->father;
my @rel = $i->mother;
my @rel = $i->parents;
my @rel = $i->husband;
my @rel = $i->wife;
my @rel = $i->spouse;
my @rel = $i->siblings;
my @rel = $i->brothers;
my @rel = $i->sisters;
my @rel = $i->children;
my @rel = $i->sons;
my @rel = $i->daughters;
my @rel = $i->descendents;
my @rel = $i->ancestors;
my $ok = $i->delete;
my @fam = $i->famc;
my @fam = $i->fams;
DESCRIPTION
A selection of subroutines to handle individuals in a gedcom file.
Derived from Gedcom::Record.
HASH MEMBERS
None.
METHODS
name
my $name = $i->name;
Return the name of the individual, with spaces normalised.
cased_name
my $cased_name = $i->cased_name;
Return the name of the individual, with spaces normalised, and surname in upper case.
surname
my $surname = $i->surname;
Return the surname of the individual.
given_names
my $given_names = $i->given_names;
Return the given names of the individual, with spaces normalised.
soundex
my $soundex = $i->soundex;
Return the soundex code of the individual. This function is only available if Text::Soundex.pm is available.
sex
my $sex = $i->sex;
Return the sex of the individual, "M", "F" or "U".
Individual functions
my @rel = $i->father;
my @rel = $i->mother;
my @rel = $i->parents;
my @rel = $i->husband;
my @rel = $i->wife;
my @rel = $i->spouse;
my @rel = $i->siblings;
my @rel = $i->older_siblings;
my @rel = $i->younger_siblings;
my @rel = $i->brothers;
my @rel = $i->sisters;
my @rel = $i->children;
my @rel = $i->sons;
my @rel = $i->daughters;
my @rel = $i->descendents;
my @rel = $i->ancestors;
Return a list of individuals related to $i.
Each function, even those with a singular name such as father(), returns a list of individuals holding that relation to $i.
More complex relationships can easily be found using the map function. eg:
my @grandparents = map { $_->parents } $i->parents;
delete
my $ok = $i->delete;
Delete $i from the data structure.
This function will also set $i to undef. This is to remind you that the individual cannot be used again.
Returns true iff $i was successfully deleted.
Family functions
my @fam = $i->famc;
my @fam = $i->fams;
Return a list of families to which $i belongs.
famc() returns those families in which $i is a child. fams() returns those families in which $i is a spouse.
perl v5.14.2 2012-04-12 Gedcom::Individual(3pm)