10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Am confused with the usage of "sed" command
I want to replace a single line with multiple lines of a file..
eg.,
A file has
Hi, How are you?
I need to replace as
Am fine
What are You doing?
I used the script as
string1="Hi, How are you?"
echo "$string1 is the value"... (4 Replies)
Discussion started by: Priya Amaresh
4 Replies
2. Shell Programming and Scripting
Hi,
I need some iteration to do the following work.
Sample:
ANS|26-Jan-2012|26|MON|12536.1
ANS|26-Jan-2012|26|TUE|2536.1
ANS|26-Jan-2012|26|THUR|789.1
SED|26-Jan-2013|32|MON|258.1
SED|26-Jan-2013|32|TUE|369.1
SED|26-Jan-2013|32|THUR|2145.1
OUTPUT:
... (3 Replies)
Discussion started by: anshaa
3 Replies
3. Shell Programming and Scripting
I have an xml file that is stripped down to output that looks bacically like;
<!-- TABLEA header -->
<tablea>
some fields
</tablea>
<!-- TABLEB header -->
<!-- TABLEC header -->
<tablec>
some fields
</tablec>
I want to remove the header... (3 Replies)
Discussion started by: Griffs_Revenge
3 Replies
4. Shell Programming and Scripting
HI,
My input file contains the data as like below:
A1234119993
B6271113
Bghjkjk
A1234119992
B6271113hi
Bghjkjkmkl
the output i require is :
A1234119993 B6271113 Bghjkjk
A1234119992 B6271113hi Bghjkjkmkl
Please help me in this.
Thanks (6 Replies)
Discussion started by: pandeesh
6 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
6. Shell Programming and Scripting
Dear All,
I want to split single line into two line or three lines wherever “|” separated values comes using
Input line
test,DEMTEMPUT20100404010012,,,,,,,,|0070086|0070087,
output shoule be
test,DEMTEMPUT20100404010012,,,,,,,,0070086,
test,DEMTEMPUT20100404010012,,,,,,,,0070087, (14 Replies)
Discussion started by: arvindng
14 Replies
7. Shell Programming and Scripting
It sounds a bit confusing but what I have is a text file like the example below (without the Line1, Line2, Line3 etc. of course) and I want to move every group of characters into a new line after each space.
Example of text file;
line1 .digg-widget-theme2 ul { background: rgb(0, 0, 0) none... (7 Replies)
Discussion started by: lewk
7 Replies
8. Shell Programming and Scripting
Can any one give me the idea on replacing multiple blank lines with a single blank line?
Please conside it for a file having more than 100 number of characters.
Regards,
Siba (3 Replies)
Discussion started by: siba.s.nayak
3 Replies
9. UNIX for Advanced & Expert Users
hey guys, how do i replace only a line within a file without messing up the rest of the contents of the file?
see, if possible can you guys give me a straight forward way to do this. i dont want a complex command. what i mean is i know i can accomplish this by using sed, well, i think i can,... (3 Replies)
Discussion started by: Terrible
3 Replies
10. UNIX for Dummies Questions & Answers
Dear friends,
In VI, I have these data shown below:
Line1
Line2
Line3
Line4
How can I JOIN these line to the first line? When I finished I should have:
Line1 Line2 Line3 Line4
is there a text length limit of how long a single line can be in VI?
Thank you much! (10 Replies)
Discussion started by: bobo
10 Replies