10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file (pema)with a single long record which i have to break up into multiple lines
Input
s1aaaaaaaaaaaaaaaaaaaaaaas1bbbbbbbbbbs1cccccccccc
Output
s1aaaaaaaaaaaaaaaaaaaaaaa
s1bbbbbbbbbb
s1cccccccccc
m planning to do it by replacing s1 by \ns1 \n is the new line character
i... (5 Replies)
Discussion started by: pema.yozer
5 Replies
2. Shell Programming and Scripting
hi i have two files
one of the form
1 2
2 45
3 56
4 98
5 6598
6 98
7 10
8 0
9 15
10 56
This file's significance is that it maps the number in first column to that of the number in second column
The other file is of the form
1
2 (1 Reply)
Discussion started by: vaibhavkorde
1 Replies
3. Shell Programming and Scripting
Greetings,
I am using tcsh to write a script that will replace the numbers in a file with a single number, the caveat is that this file has blank lines which are necessary for another step down the line so I need to preserve the blank lines. I have tried sed and awk but both will collapse the... (1 Reply)
Discussion started by: bonesy
1 Replies
4. Shell Programming and Scripting
Hi,
I have lines in some files that look exactly as below, and the line numbers they occur in are always the same. (Lines 136-139)
W 0.00000000 0.00000000 2.00000000
W 0.50000000 0.50000000 2.50000000
W 0.00000000 0.00000000 3.00000000
W 0.50000000 0.50000000 3.50000000
I'd like to... (0 Replies)
Discussion started by: bluesmodular
0 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
contents of my file is like this:
xxx xxx1 N N N 0
yyy yyy1 Y N N 0
i want to replace 1st N of xxx xxx1 N N N 0 line with Y.
i. e i want the output like this:
xxx xxx1 Y N N 0
how can i do this?
please help.
Thanks (8 Replies)
Discussion started by: Usha Shastri
8 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I would like to know how, iff at all we can, we may use the 'tr' command to replace a single character with multiple characters.
eg: if i have a string valued "him", how can i use 'tr' to replace 'i' with "oo" to make "hoom".
Just replacing a single character by many.
tried:-... (16 Replies)
Discussion started by: hkansal
16 Replies
7. Shell Programming and Scripting
hi
i have a file and reading line by line, i need to replace 8-15 and 18-27 charaters with character 'x'.
Eg: satyasatxxxxxxxsatxxxxxxxxxtyasatyasatyasatyasatyasatya
please help
thanks
Satya (1 Reply)
Discussion started by: Satyak
1 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to write a shell script which firstly will search some files and then increase the port numbers mentioned in them by a certain no.
let me clear it with an example-
suppose there r few files a,b,c,d....
file a's content-
<serverEntries xmi:id="ServerEntry_1"... (3 Replies)
Discussion started by: ankushsingh10
3 Replies
9. Shell Programming and Scripting
I have some ASCII files containing numerous numbers. What I'd like to do is replace all numbers greater than 0 with 1.
Examples of the numbers include: - 000011 and 000042
Thanks (4 Replies)
Discussion started by: vrms
4 Replies
10. UNIX for Dummies Questions & Answers
Hi ,
I need to change the last character of the line:
ie:
input file:
(raj,
muthu,
mani,
Output:
(raj,
muthu,
mani);
so i need to change the last comma by the closing braces so help me out in the issue.
Thanks in advance. (2 Replies)
Discussion started by: ithirak17
2 Replies