Search Results

Search: Posts Made By: yirgacheffe
1,629
Posted By yirgacheffe
Thank you for your answer. The example desired...
Thank you for your answer.
The example desired format I inserted earlier is displayed slightly differently to what was intended: the number copied from after the "SAMPLE" expression should be...
1,629
Posted By yirgacheffe
Text editing/manipulation
Hello all.
I need to rearrange a very long text file with the following format.
The number of lines in each block is variable, but is between 1 and 10.

Any hints what command could I use for...
3,932
Posted By yirgacheffe
Thanks again everyone, the final awk...
Thanks again everyone,

the final awk approach did work, my longest file had ~1500 lines.
And apologies if I could not explain everything properly from the start....like the fact that my files not...
3,932
Posted By yirgacheffe
Thanks a lot everyone, I think raj_saini20 nailed...
Thanks a lot everyone, I think raj_saini20 nailed it, this is what I need.
Was going with

sed 's/^[0-9][0-9][0-9][^0-9]/0&/;s/^[0-9][0-9][^0-9]/00&/;s/^[0-9][^0-9]/000&/' /path/to/infile

to...
3,932
Posted By yirgacheffe
Thanks RudiC, I have tried the join command...
Thanks RudiC,

I have tried the join command on sorted versions of my input files as well.
They are actually sorted....first column always increases.
I was suggested the padding with 0...
3,932
Posted By yirgacheffe
Sorry for the long inserts......could not see...
Sorry for the long inserts......could not see attachment button.....will look for it.
Command tried was :
join file1.txt file2.txt
Also
join -1 1 -2 1 file1.txt file2.txt

With few other...
3,932
Posted By yirgacheffe
Thanks, I have tried join, as mentioned above....
Thanks, I have tried join, as mentioned above. But it stops at 1000....as soon as the width of the joining column changes from 3 characters to 4 Characters. I wish join could do it.....I could not...
3,932
Posted By yirgacheffe
Joining Two Files Does not Work as Expected
Hi,

I would like some help with the above awk command.

I am trying to use the join command to join two files, no luck.
I need to put the second column from file2.txt into each matching field...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 03:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy