Search Results

Search: Posts Made By: sandy88
7,529
Posted By ygemici
what is your O.S (solaris or aix or ?_) with...
what is your O.S (solaris or aix or ?_)
with Gnu Sed
# val=9899
echo $INPUT|sed 's/\(._.\{8\}\).\{4\}\(_.*_\).*/\1'$val'\2/'
1_120606259899_3_4.5_
so it is
# echo $INPUT|sed...
7,529
Posted By ygemici
what is the desired output ? # echo $INPUT|sed...
what is the desired output ?
# echo $INPUT|sed -r 's/(._.{8}).{4}(_.*_).*/\19899\2/'
1_120606259899_3_4.5_
7,529
Posted By ygemici
u can try this # echo $INPUT|sed...
u can try this
# echo $INPUT|sed 's/\(._.\{8\}\).\{4\}\(_.*_\).*/\19899\2/'
7,529
Posted By itkamaraj
use this NEW_FILE=$(echo "$FILE" | nawk...
use this


NEW_FILE=$(echo "$FILE" | nawk -F_ -v n="120606259899" -v OFS=_ '{$2=n;$NF="_";print}' | sed 's/__$//')
7,529
Posted By itkamaraj
NEW_FILE=$(echo "$FILE" | nawk -F_ -v...
NEW_FILE=$(echo "$FILE" | nawk -F_ -v n="120606259899" -v OFS=_ '$2=n;$NF="_"' | sed 's/__$//')
7,529
Posted By itkamaraj
FILE="1_120606259532_3_4.5_888" NEW_FILE=$(echo...
FILE="1_120606259532_3_4.5_888"
NEW_FILE=$(echo "$FILE" | nawk -F_ -v n="120606259899" -v OFS=_ '$2=n')
echo $NEW_FILE
Showing results 1 to 6 of 6

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