10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
2. Shell Programming and Scripting
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies
3. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
4. Shell Programming and Scripting
I am trying to delete lines in archived Apache httpd logs
Each line has the pattern:
<ip-address> - - <date-time> <document-request-URL> <http-response> <size-of-req'd-doc> <referring-document-URL>
This pattern is shown in the example of 6 lines from the log in the code box below. These 6... (1 Reply)
Discussion started by: Proteomist
1 Replies
5. UNIX for Dummies Questions & Answers
When I cat a file that has several hundred characters in a line, the right hand side is truncated. How can I make everything displayed on my screen word wrap? (6 Replies)
Discussion started by: bsimon
6 Replies
6. Web Development
Hi,
I have text (string) like this:
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
Blah blah blah blah
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah... (5 Replies)
Discussion started by: LukasB
5 Replies
7. UNIX for Dummies Questions & Answers
I just typed several long lines into vi but I only want it to have 80 columns. How can I set this in vi? (3 Replies)
Discussion started by: guitarscn
3 Replies
8. Shell Programming and Scripting
Hi,
I got some timetable in a file but it is all mixed up like this
01:00 hgrtwhrt #104:00 tyergethr05:00
tqqrthd qrth #107:00 qhtrhqerth10:00 qerthrthqr qtrqthr
qthrrt11:00 thqrthqrthrr
rthgreth #212:00 trhrthrth14:00 wrthwrtwrqrthwrthwr
#2116:00 trqhthtr: rthrthr17:00 rtwhtrhwrth rthwrt... (6 Replies)
Discussion started by: stinkefisch
6 Replies
9. Shell Programming and Scripting
Hi,
This is my first time post a new thread. I have been trying to work on this for the past 2 days and could not find any good solution.
I have 1 long long line ( EDI wrapped file) like below:
NEW*SR*04411763447*279*278*Q~*ZR*AAV*SR*04511763460*SQ*21B37F04~HL*305*304*Q~K~SN1*1*1*SR*05511763461*... (6 Replies)
Discussion started by: vanda_25
6 Replies
10. UNIX for Dummies Questions & Answers
I am using vi to edit shell scripts, but whenever I get to the end of the line it goes to the next line, and when I run the script it considers whatever was placed onthe next line a new command...I guess this has to do with word wrap- how do I continue to write on one line? (3 Replies)
Discussion started by: dangral
3 Replies