I would like to split a file incrementally. My file looks like:
I would like to have files which have "path" incrementally.
The 1st file has the 1st path. The 2nd file has the 1st and 2nd paths. The 3rd file has the 1st, 2nd, and 3rd paths. This incremental splitting will be continued the end of the original file. (upto n).
P1:
P2:
P3:
Could you let me know how to do this job? Any language (sed,awk,grep) are okay to me.
I've refined the filesystem size using awk and directed to a file name.
eg, here's the content in a file called "numbers"
$cat numbers
345
543
23423456
44435
546
.
.
how do you write a script to all these numbers to get the total?
thanks a lot. (9 Replies)
Hi, I was wondering if someone could help with what is probably a fairly easy problem. I have two variables, i is between 1-5, j is between 11-15
I'd like to produce this:
1_11
2_12
3_13
4_14
5_15
Each number goes up incrementally with the other.
But my shoddy code is not... (5 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)
Please, i have a question about rsync command:
Here is the command that i have used in my script:
rsync -ratlz --rsh="/usr/bin/sshpass ssh -o StrictHostKeyChecking=no" -aAXHltzh --progress --numeric-ids --devices --rsync-path="rsync" $1 $hostname:$1
using this command, i can... (0 Replies)
Example
I have following requirements where i need to search for particular string from the log files.Files will be archived with number attached end to it and creates a new log file.
First Day i will ran at 8:00 AM
Filename:a.log1
Wed Aug 24 04:46:34... (1 Reply)
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)