Search Results

Search: Posts Made By: honey26
5,085
Posted By balajesuri
use sed -i [user@host ~]$ cat file hello ...
use sed -i

[user@host ~]$ cat file
hello
world
[user@host ~]$ sed '1s/..//' file
llo
world
[user@host ~]$ sed -i '1s/..//' file
[user@host ~]$ cat file
llo
world
[user@host ~]$
5,085
Posted By balajesuri
sed -i basically uses a tmp file and then...
sed -i basically uses a tmp file and then renames it to the original file. You could do the same. So, send the output to a new temp file. Rename the tmp file to original file.

sed '1s/^..//' file...
3,238
Posted By Don Cragun
RudiC already told you that that script would...
RudiC already told you that that script would only work if all of the times for a given field 1 were on the same date. We would hope that you would have used his suggestion as a starting point and...
3,238
Posted By RudiC
Not sure I understand that spec. Trypaste...
Not sure I understand that spec. Trypaste -sd"\t\t\t\n" file | sort -k3,3 | tail -1 | tr '\t' '\n'
00150366 05/08/2015 07:28:32
8000900186167+++ 50195281000000000371001010903236...
3,238
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

Try paste -sd"\t\t\t\n" file | sort -k1,1 -k3,3r | awk '!T[$1]++ {sub ($1 " " $2 " " $3 "\t", ""); gsub ("\t", "\n"); print}'
8000900186167+++...
Showing results 1 to 5 of 5

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