10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Everyone,
On my Linux box I have a text file having block of few lines and this block lines separated by one blank line. I would like to format and print these lines in such a way that this entire block of lines will come as single comma separated line & again next block of lines in next... (7 Replies)
Discussion started by: gr8_usk
7 Replies
2. UNIX for Dummies Questions & Answers
:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux.
I am working in Linux terminal.
I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies
3. Shell Programming and Scripting
I need to run a cronjob that will monitor a directory for files with a certain extension, when one appears I then need to run the below scripts How do I go about combining the following sed statements into one script? and also retain the original filename.?
sed 's/71502FSC1206/\n&/g' # add a... (2 Replies)
Discussion started by: firefox2k2
2 Replies
4. Shell Programming and Scripting
Hi All,
I have a input file as sample below
<this is not starting of file>
record
line1
line2
line3
end
line4
line5
record
line6
line7
line8
my requirement is this, i want to select a pattern between first record and end, whatever is written between first record and end.
and... (0 Replies)
Discussion started by: adgangwar
0 Replies
5. Programming
Hi All
I need a small help for the below format in making a small script in Perl or Shell.
I have a file in which a single line entries are broken into three line entries.
Eg:
I have a
pen and
notebook.
All i want is to capture in a single line in a separate file.
eg: I have a pen and... (4 Replies)
Discussion started by: Kalaiela
4 Replies
6. Shell Programming and Scripting
Hi,
I'm using AIX(ksh shell).
> cat temp.txt
"a","b",0
"c",bc",0
"a1","b1",0
"cc","cb",1
"cc","b2",1
"bb","bc",2
I want the output as:
"a","b","c","bc","a1","b1"
"cc","cb","cc","b2"
"bb","bc"
I want to combine multiple lines into single line where third column is same.
Is... (1 Reply)
Discussion started by: samuelray
1 Replies
7. Shell Programming and Scripting
This is the problem actually:
This regex:
egrep "low debug.*\".*\"" $dbDir/alarmNotification.log
is looking for data between the two quotation marks:
".*\"
When I hate data like this:
low debug 2009/3/9 8:30:20.47 ICSNotificationAlarm Prodics01ics0003 IC... (0 Replies)
Discussion started by: ndedhia1
0 Replies
8. Shell Programming and Scripting
Got another sed question :)
My text block is
I need to do the following:
If (and only if) the line starting with 10002,11 is followed by a line starting with 10004,9 , insert the line 10003,9 between the 2
Thus, my output should be
I tried
but this gives me
(the order... (3 Replies)
Discussion started by: orno
3 Replies
9. Shell Programming and Scripting
Hi all:
I have a file in which the contents are as following:
...
This is a test
ONE
TWO
Hello, world!
XXX YYY CCC
test again
three, four
five
six
seven
world
AAA BBB QQQ
test
eight, nine
world (3 Replies)
Discussion started by: xb88
3 Replies
10. Shell Programming and Scripting
I am fairly new to scripting. But I have been able to extract and format all of my information required into one file. My issue is that one character is on a separate line. I need to be able to add the character to the previous line.
ex.
abcdefghi
1
bcdefghij
3
cdefghijk
4
need to... (4 Replies)
Discussion started by: DUST
4 Replies