I basically need to know how to pass the results to a directory and filename, but these have to be variables since I will be running the script on many different files, and the esults get stored in a seperate directory
---------- Post updated at 05:33 AM ---------- Previous update was at 05:11 AM ----------
Okay.. I see that the path is not recognized by gawk.. so I have kind of seperated it.
All,
We receive a file with a large no of records (records can vary) and we have to split it into two files based on another file. e.g.
File1:
UHDR 2008112
"25187","00000022","00",21-APR-1991,"" ,"D",-000000519,+0000000000,"C", ,+000000000,+000000000,000000000,"2","" ,21-APR-1991... (7 Replies)
Hi All,
I have a rather stange set of requirements that I'm hoping someone here could help me with. We receive a file that is actually a concatenation of 4 files (don't believe this would change, but ideally the solution would handle n files).
The super-file looks like:... (7 Replies)
I am using grep to match a pattern, but the output is strange.
$ grep -r -o "pattern" *
Gives me:
Binary file foo1 matches
Binary file foo2 matches
Binary file foo3 matches
To find the lines before/after, I then have to use the following on each file:
$ strings foo1 | grep -A1 -B1... (0 Replies)
Dear All,
I have two files but want to extract data from one based on another... can you please help me
file 1
David
Tom
Ellen
and file 2
David|0010|testnamez|resultsz
David|0004|testnamex|resultsx
Tom|0010|testnamez|resultsz
Tom|0004|testnamex|resultsx
Ellen|0010|testnamez|resultsz... (12 Replies)
Hi All,
I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom.
from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
hdr=$(cut -c1 $path$file|head -1)#extract header”H”
trl=$(cut -c|path$file|tail -1)#extract trailer “T”
SplitFile=$(cut -c 50-250 $path 1$newfile |sed'$/ *$//' head -1')# to trim white space and extract table name
If; then # start loop if it is a header
While read I #read file
Do... (4 Replies)
Hi ,
I am having a scenario where I need to split the file based on two field values. The file is a fixed length file.
ex:
AA0998703000000000000190510095350019500010005101980301
K 0998703000000000000190510095351019500020005101480 ... (4 Replies)
Hello.
The task :
Using multiple commands like :
gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file.
For readiness I must insert page break.
When the program is finished I want to convert the final text file to a pdf file.
When finished, I got two files : One text file and One pdf... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT HPUX
clone
clone(7) Miscellaneous Information Manual clone(7)NAME
clone - opens a major and minor device pair on a STREAMS driver
DESCRIPTION
The driver is a "pass through" device driver that allows other drivers to select unique minor device numbers on each In effect, the driver
passes an open operation through to the other driver. This mechanism allows for multiple instantiations of a driver, each with a different
minor number, through a single device file.
When the driver is opened, it is passed a major and minor device number by the operating system. The major number is the driver's major
number (72), and the minor number is the major number of the driver the user wishes to clone (referred to here as the target driver). The
driver calls the open routine of the target driver with the flag which specifies a clone open. The target driver's open routine allocates
an unused minor number. The target driver must use to make a new device number for the newly created device, and must set to the new
device number returned by The new device number is returned to the open through The open then returns to the user a file descriptor that
points to the new instantiation of the target driver.
The driver is an example of a clonable driver.
Notes
It is not possible to do multiple opens of a device with the same major and minor number using the driver. This is because the driver is
only given the major number of the driver to be cloned, and that driver will then select a minor number which has not been opened.
When called with a pathname which corresponds to the clonable driver, will return different results than when it is called on a file
descriptor returned from of the same clonable driver pathname.
RETURN VALUES
If the driver is given an invalid minor number, or if the driver indicated is not a clonable driver, the fails and is set to [ENXIO].
SEE ALSO open(2), fstat(2).
clone(7)