Sponsored Content
Top Forums Programming [Solved] Problem with fork() while reading files Post 302811839 by pfpietro on Friday 24th of May 2013 09:53:42 AM
Old 05-24-2013
Found the problem! It wasnt the ; but the wait cycle!

Thank you all!
 

9 More Discussions You Might Find Interesting

1. Programming

fork() problem

i'm just trying to make 2 process read from the same 1 line a time. For some reason only the child reads. #include<stdio.h> #include <sys/types.h> void getlinefromfilep(void); void getlinefromfilec(void); int see=0; FILE * fileptr1; //need globe variable to tell pro3 to stop main()... (3 Replies)
Discussion started by: ddx08
3 Replies

2. Shell Programming and Scripting

HELP!!!! Problem reading in files

HI, I have wrote a script which reads in a file that has a list of files within it. The script then searches the directory for these files and when found will output to an email with a layout table indicating the date of the file and an ok status if the file = todays date if not a waiting... (1 Reply)
Discussion started by: Pablo_beezo
1 Replies

3. Programming

solved: glibc detection corruption using a fork in popen

Hi, I am having a hell of a time getting this to work. So basically, I have opened a popen to run a program that is going to prompt an action to occur half way through, when it gets to this I need to create a separate process and do some stuff, then return to the original process. This works... (0 Replies)
Discussion started by: imrank27
0 Replies

4. Shell Programming and Scripting

[Solved] Problem in reading a file line by line till it reaches a white line

So, I want to read line-by-line a text file with unknown number of files.... So: a=1 b=1 while ; do b=`sed -n '$ap' test` a=`expr $a + 1` $here do something with b etc done the problem is that sed does not seem to recognise the $a, even when trying sed -n ' $a p' So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies

5. Shell Programming and Scripting

[Solved] Reading the last word in a file from a script

Hello everybody, My first time here and my english is not very good I hope you understand me. I'm trying to read a file that contains two zip archive names. Here my file content is: package1.zip package2.zip At the end of the line there is a \n character. I read this file from a... (2 Replies)
Discussion started by: Aurea
2 Replies

6. UNIX for Dummies Questions & Answers

[Solved] Problem with listing my files

Hello, In my directory i have got a list of files like below unix1a.csv unix1b.csv unix1c.csv unix1d.csv unix1y.csv I have done ls -lrt unix1.csv, how can i get my unix1y.csv also get listed along with this.. (5 Replies)
Discussion started by: sathyaonnuix
5 Replies

7. UNIX for Dummies Questions & Answers

Problem with fork() while reading files

Good evening everyone. I have my finals and I'm facing a problem: I have a for cycle that is supposed to fork 2 children but somehow it forks only the first one. What am I doing wrong ? #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h>... (1 Reply)
Discussion started by: pfpietro
1 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Reading Array And Send An Email

I am trying to find an example for reading an array instead of reading a file and send out an email in ksh. Can you please help is that possible? Algorithm #!/bin/ksh i=0 set -A ARR if then let i=$ ARR="A does n't match with B" fi if then let i=$ ARR="P does n't match with Q"... (11 Replies)
Discussion started by: Ariean
11 Replies

9. Shell Programming and Scripting

[Solved] Need Help in reading Response file

Hi All, I have a requirement to read response file which looks like below Ex: NAME=SAM DOB=01/01/1980 ADDRESS= 7658 James Street NewYork 0000 Now, I need to take NAME, DOB, ADDRESS into variables I am fine taking NAME and DOB I need help on how can I... (6 Replies)
Discussion started by: mallak
6 Replies
RESMERGER(1)						    BSD General Commands Manual 					      RESMERGER(1)

NAME
/usr/bin/ResMerger -- Merges resource forks or files into one resource file SYNOPSIS
/usr/bin/ResMerger [-fileCreator <fileCreator>] [-fileType <fileType>] [-[a]ppend] [-srcIs RSRC | DF] [-dstIs RSRC | DF] file ... -o <dest-file> DESCRIPTION
The /usr/bin/ResMerger command merges the Carbon Resource Manager resource data in multiple files into a single file. The output file may be one of the input files. The /usr/bin/ResMerger command takes the following flags and arguments: -fileCreator <fileCreator> Sets the HFS creator type of the output file. The default is '????'. -fileType <fileType> Sets the HFS file type of the output file. The default is '????'. -[a]ppend Append to output file, rather than overwriting it. -srcIs RSRC | DF The fork in which to look for resources in the input file(s). The default is the data fork (DF). -dstIs RSRC | DF The fork in which to write resources in the output file. The default is the data fork (DF). -skip <type> Specifies resource type to skip during the resource merge. May be used multiple times, to specify multiple resource types to skip. file Specifies one or more input files. Note that as there is only one srcIs flag, the input files must be homogenous, that is, the resources must be in the same fork of all input files. -o <dest-file> Specifies the output file. If the fork designated by -dstIs exists, it is overwritten unless the -a flag is provided; if it does not exist, it is created. SEE ALSO
Rez(1), DeRez(1), RezWack(1), UnRezWack(1), SplitForks(1) Mac OS X April 12, 2004 Mac OS X
All times are GMT -4. The time now is 06:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy