Search Results

Search: Posts Made By: sslr
15,555
Posted By sslr
Oops. input: | 123456789| output:|123|45| ...
Oops.
input: | 123456789|
output:|123|45|

no leading or tailing space in every field.
15,555
Posted By sslr
What if two field being cut are next to each...
What if two field being cut are next to each other, the delimiter will not be inserted?
cut -c1-3,4-5 --output-delimiter="|" input > output
The output will be:
12345

How to get 123|45?
...
15,555
Posted By sslr
:) Thank you drl. You are so helpful.
:)
Thank you drl. You are so helpful.
15,555
Posted By sslr
Is there other way using other UNIX command? awk...
Is there other way using other UNIX command? awk is not working for me.
giving me "16 bit MS-DOS Subsystem" error message. :confused:
15,555
Posted By sslr
How to insert tab at specified column.HELP
I have input like:
1234567890

cut -c1-3,6-7,9-10 input > output

Now I got 1236790.

I want to insert space between each cut. So the output like:
123 67 90

Can anybody help?
Thanks.
5,106
Posted By sslr
Thank you drl! It works well. :b:
Thank you drl!
It works well.
:b:
5,106
Posted By sslr
That's just a sample file. In a real world, we...
That's just a sample file. In a real world, we don't know how many '|' to append. Is there any way to count the number of the '|' for the first line of the file?(All records have same number of '|')....
5,106
Posted By sslr
Yes. I am aware of that. I am thinking of...
Yes. I am aware of that. I am thinking of appending '|' at the end of each line of oldfile. But I am stucked at How to count the number of '|' just for the first line?(All lines have the same pipe...
5,106
Posted By sslr
comm not working for this case. HELP!
I have two sorted files.
newfile has records like:
aaa|bbb|ccc|||
ddd||eee|fff||

oldfile has records like:
aaa|bbb|ccc|
ggg||hhh|fff

The output should like:
ddd||eee|fff||

I use comm...
Showing results 1 to 9 of 9

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