07-16-2009
thanks jim i modify a bit put ":"
Quote:
awk -F':' '{ z=$1+8; $1=sprintf("%02d:", z % 24); print $1$2}'
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've been googling for the following for the past few weeks several times, but haven't yet come across something that I could easily grasp. Can someone point me in the right direction please?
I'm trying to replace a character in file names, i.e. the character is a period, and I want to replace... (5 Replies)
Discussion started by: HLee1981
5 Replies
2. UNIX for Dummies Questions & Answers
Hi all
i am very new to shell scripting,hope u guys can help
i need to replace,sort and append character for the file that look like this:
1007032811010001000100000001X700026930409
1007032811010001000200000002X700026930409
1007032711020001000300000003X700026930409... (2 Replies)
Discussion started by: ashikin_8119
2 Replies
3. Shell Programming and Scripting
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/
Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies
4. Shell Programming and Scripting
Hi Friends,
I need a sed or awk based script to replace a character(alphabet) with ' (Apostrophe). I tried to use the following two commands
1) sed -e 's/a/'/' filename
2) awk '{sub("a","'",$1);print}' filename
but both got failed.
Any help on this.
Thanks in advance.. (3 Replies)
Discussion started by: ks_reddy
3 Replies
5. Shell Programming and Scripting
hi i have log :
i want remove some char become like this:
anybody can help me ? (7 Replies)
Discussion started by: justbow
7 Replies
6. Shell Programming and Scripting
Hello,
I want to writte a script that replace two character strings by two variables with the command sed butmy solution doesn't work. I'm written this: sed "s/TTFactivevent/$TTFav/g && s/switchSLL/$SLL/g" templatefile.
I want to replace TTFactivevent by the variable $TTFav, that is a... (4 Replies)
Discussion started by: POPO10
4 Replies
7. Shell Programming and Scripting
Hi All,
Need your help urgently.
since '$' comes at the end of the line i want to remove '$' using tr command:
file:
111111|.11|.00$
222222|2.22|.00$
333333|.33|.00$
444444|.44|.00$
Thanks in Advance (7 Replies)
Discussion started by: HemaV
7 Replies
8. Shell Programming and Scripting
Hi All,
I have a file having one line only.
It is like
trapsess:inform|10.232.167.18|1|1|50|25|0|0|0|5|1|1|78|0037|
I want to replace the numbers in last two columns by As.
It should look like
trapsess:inform|10.232.167.18|1|1|50|25|0|0|0|5|1|1|AA|AAAA|
Please, suggest me any shell... (12 Replies)
Discussion started by: mukeshbaranwal
12 Replies
9. Shell Programming and Scripting
Hi. I'm a complete noob when it comes to scripting. I have approximately 2000 files scattered throughout different locations that I need to rename. The current files have a character, "." , that needs to be replaced with an underscore. I have no clue which route to go about correcting this.... (4 Replies)
Discussion started by: Nvizn
4 Replies
10. Shell Programming and Scripting
I have a requirement as below.
In one of my column, I have data which may or may not be separted with coma always. Now I need to validate the length of these text within the coma (if available) and if the length is more than 30 characters, I need to insert a coma either at 30 characters if its... (3 Replies)
Discussion started by: aramacha
3 Replies