for writing a new file till it finds the empty record....
But...now i am trying to write a code for deleting the last 7 records (which is a trailer records and a empty records) of a file and the file name itself contains the space....
I'll use the output of ls -al to demonstrate my quick and dirty method:
The taccommand is cat, backwards... it takes input and spits it out backwards by line. The command tail +x, where x is a positive integer, outputs the command's input starting at line x. Note that saying "chop off the first 7 lines" is the same as saying, "start showing output at line 8". Then, just tacit again and you're done. Like I said, this is quick and dirty... flip it upside down, chop its feet off, flip it rightside up again. Not recommended for any situation where even moderately good performance is needed! Oh, and so far as I've seen, if a system doesn't have tac, you can usually use tail -r in its place.
Hi I am new to shell programming in unix
Please if I can provide help.
I have a file structure of a header record and "N" detail records.
The header record will be the total number of detail records
I need to split the file in 2:
One for the header
Another for all detail records
Could... (1 Reply)
Hi,
Can any one help me, in deleting the records from the database table based on the following condition:
script should take a configurable parameter as input. The input is nothing but “no. of years”.
For example, if I enter 2 as input parameter, then the 2 year old records should get... (2 Replies)
Hi,
I need to delete one row from a .dat file.
error processing column PCT_USED in row 1053295 for datafile /exp/stats/ts_stats.dat
ORA-01722: invalid number
This is used to load records using sql loader.
Please let me know the procedure to do it.
Regards,
VN (3 Replies)
I have a excel sheet with contains the records as below..
also uploaded the input excelsheet and the output excel sheet(expected output).
322mpls32.net.xyz.comBW: 44.0 M Hrly Avg (IN /... (1 Reply)
I have 2 files
"File 1" is delimited by ";" and "File 2" is delimited by "|".
File 1 below (3 record shown):
Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones
Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull
Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Hi everyone.
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
ID: 20
Name: X
Age: 19
ID: 21
Name: Z
ID: 22
Email: xxx@yahoo.com
Name: Y
Age: 19
I want to grep records that... (4 Replies)
Hello,
I'm have a file of xy data with over 1000 records. I want to delete both x and y values for any record that has the same x value as any previous record thus removing the duplicates from my file.
Can anyone help?
Thanks,
Dan (3 Replies)
I have a very big file of 5gb size and there are about 50 million records in there. I have to delete the records based on recrord number that I know fromoutside with out opening the file. The record numbers are very random like 5000678, 7890005 etc.
Can somebody let me know how i can... (5 Replies)
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
I had to delete rows when a record was missing a field. My solution was
cut -c 202-402 ${dataFile} | awk '{if (substr($0,103,30) !~ /^ *$/) print $0} >> ${workFile}
The cut is because they came two records to a row.
Anyone want to offer a more elegant solution? (2 Replies)