10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Im using sed on an AIX machine. I am trying to change the 137-139 characters if they are a ' 36'/'000' to a '036'. The positions that need to be changed are fixed.
the source data that I have is$cat v.txt
4000422985400050462239065593606500000007422985707771046154054910075641MC0318AMWAY... (9 Replies)
Discussion started by: dsid
9 Replies
2. UNIX for Dummies Questions & Answers
I would like to remove all characters starting with "%" and ending with ")" in the 4th field - please help!!
1412007819.864 /device/services/heartbeatxx 204 0.547%!i(int=0) 0.434 0.112
1412007819.866 /device/services/heartbeatxx 204 0.547%!i(int=1) 0.423 0.123... (10 Replies)
Discussion started by: snemuk14
10 Replies
3. Shell Programming and Scripting
Need command for position based replace:
I need a command to replace with 0 for characters in the positions 11 to 20 to all the lines starts with 6 in a file.
For example the file ABC.txt has:
abcdefghijklmnopqrstuvwxyz
6abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz... (4 Replies)
Discussion started by: thangabalu
4 Replies
4. Shell Programming and Scripting
Hi experts,
My file looks something like this.
abcXX4,7,234
abc,defg,45XX23,74,123
The number of commas left of the XX can vary. The question is how can I replace all the commas left of the 'XX' with an underscore?
abcXX4,7,234
abc_defg_45XX23,74,123
Thanks! (5 Replies)
Discussion started by: abercrom
5 Replies
5. Shell Programming and Scripting
Hi Gurus,
I need replace some charactors in a file.
in following example. I need replace from 4th charactor to 6th charactor with x in each line.
abcdefghijklmn
123456789011
excepted result:
abcxxxghijklmn
123xxx789011
Thanks in advance. (6 Replies)
Discussion started by: ken6503
6 Replies
6. Shell Programming and Scripting
Hi,
I have a fixed width file.
The way this file works is say for example there are 30 columns in it each with different sizes say 10,5,2, etc...
If data in a field is less than the field size the rest of it is loaded with spaces.
I would like an awk command to that would replace
I have... (8 Replies)
Discussion started by: pinnacle
8 Replies
7. Shell Programming and Scripting
Hello
I want to add some value at the specific position.
My file has data like
Hello
Welcome to UNIX Forums
Need Assistance
I want to add some value at the end but at same character position for all lines.
I want my output file to have data like :
Here '_' represents blanks.... (3 Replies)
Discussion started by: dashing201
3 Replies
8. Shell Programming and Scripting
Hi,
I need to replace 10 characters string (21-30) in a file with another string.
I tried using cut command, i am able get these 10 charaters, but do not know how to replace them inside the file.
for example file content(these are alphanumeric characters):... (3 Replies)
Discussion started by: Johny001
3 Replies
9. Shell Programming and Scripting
I'm extremely new to scripting and linux in general, so please bear with me. The class I'm taking gives virtually no instruction at all, and so I'm trying to learn everything off the web.
Anyway, I'm trying to extract characters that follow after a specific pattern ( '<B><FONT FACE="Arial">' ) but... (3 Replies)
Discussion started by: livos23
3 Replies
10. Shell Programming and Scripting
Hi,
I have a file in which i want to replace the charaters from position 3-5 with a particular string for the first line.
For ex
The file contains
abcdefghij
jkdsflsfkdk
908090900
i want to replace the characters 3-5 for the first line as 678
so, the file should look like
... (7 Replies)
Discussion started by: dnat
7 Replies