I have the following script:
(echo -n `curl http://www.example.com/scores.txt | grep mylocation`; date +%Y%m%d%H%M%S) >> myscores.txt
This script works fine, except that it places the timestamp at the end of the file myscores.txt. How do add the timestamp as the first column and then a tab and... (4 Replies)
Hi ,
I want to change the order of a string using sed command . Is it possible ?
$echo "abc123xyz" | sed 's/\()*\) \(*\)/\2\1/'
abc123xyz
$ echo "abc123xyz" |sed 's/\()*\) \(*\) \()*\)/\2\1\3/'
abc123xyz
I want to change the string ,
abc123xyz as
xyz123abc .
Is it... (5 Replies)
I need help in removing a leading zero in a particular position.
For eg.: XYZ*04567472*0099*020091231*0123*0.12
In the above line, I want to replace "*0123" with "123" and "0.12" with ".12". I want to remove the leading zero only in position number 4 and 5 (the bolded segments)
I was able... (10 Replies)
Hello ,
i have a fixed-length record file where each column has a specific position. how can retrive two or more column based on their positions in the file ?
Thank you (5 Replies)
Good evening
I have a file as below and want to change the order, as in the second column, sed awk Pearl
Thanks
aaaaaaaaaa
bbbbbbbbb
cccccccc
aaaaaaaaaa
bbbbbbbbb
cccccccc
aaaaaaaaaa
cccccccc
bbbbbbbbb
aaaaaaaaaa
cccccccc
bbbbbbbbb (8 Replies)
Hi All,
input file:
echo "a|b|c|d|test|123|same" | awk 'BEGIN {FS=OFS="|"} {print $1,$2,$7,$4,$5,$6}'
Got Output :
a|b|same|d|test|123
This is the sample input file with less fields. But my original file contains more field values. How to replace last value to 3rd postion value. Because... (8 Replies)
hi guys
I have a service that depends on some shares (NFS shares ) that need to be mounted before before the service start so the service-app finds the NFS shares and starts correctly...
I am confused here this is what I found but I am not sure what to do in order to change it
BTW is Suse... (2 Replies)
I am trying to reorder columns based on a value in a field in the attached file. Thank you :).
If $11 is not equal to "unknown", then in a new text file $4, $11, $7, $13
For example, row 24 $11 is not unknown
A_16_P39089234, chr10:76765556-76765615, KAT6B, 0.9337 (5 Replies)
Goodmorning,
I know how to cut a string and a column, and how to find a word.
I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title.
I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)