10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
2. Shell Programming and Scripting
input1
a_a a/a 10 100
a1 a_a 20 200
b1 b_b 30 300
input2
a_a a/a xxx yyy
a1 a1 lll ppp
b1 b_b kkk ooo
output
a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies
3. Shell Programming and Scripting
Im usind se as follows,
sed 's/**** DRAFT ****/ /' a.lst > b.lst
'**** DRAFT ****'
in a.lst goes to' ****' in b.lst
Does anyone know the right syntax?
Thanks!!
---------- Post updated at 11:02 AM ---------- Previous update was at 11:00 AM ----------
... (4 Replies)
Discussion started by: ttilsch
4 Replies
4. Shell Programming and Scripting
How do I remove parentheses using sed?
input (192.168.1.1)
output 192.168.1.1 (4 Replies)
Discussion started by: streetfighter2
4 Replies
5. Shell Programming and Scripting
I have some troubles with this:
insert (at the beginning of line) character "#" from line 5 to line 15 (3 Replies)
Discussion started by: aspire
3 Replies
6. Shell Programming and Scripting
Hello Experts,
I am being silly here and just need someone to point out what the silliness is
I have a bunch of lines that are
12343 words here that can chage (hat:98-345) more word and numbers here
I just want to pick out the numbers after "hat:" which is in every line. I have been... (8 Replies)
Discussion started by: gobi
8 Replies
7. Shell Programming and Scripting
I have output like the following:
B D 20070116095820001 N D S0000579.LOG S0000582.LOG
B D 20070116095750001 N D S0000574.LOG S0000576.LOG
B D 20070116095734001 N D S0000570.LOG S0000573.LOG
B D 20070116095705001 N D S0000569.LOG S0000569.LOG
B D ... (5 Replies)
Discussion started by: rdudejr
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have the following file:
--#
--#line1
--#line2
--#line3
--#
--#line4
--#line5
and I want to use something like:
sed 's/--#/newline/g' file > newfile
to substitute the lines containing only '--#', but when I try, it replaces every instance of '--#' with 'newline' and I... (7 Replies)
Discussion started by: Dave724001
7 Replies
9. UNIX for Dummies Questions & Answers
Hello. Just trying to write this line to an empty file. CAT shows nothing was written. Any suggestions or answers?
#!/bin/bash -x
THIS=FIRSTLINE
sed '1w '$THIS'' testfile
cat testfile
Thank you. (2 Replies)
Discussion started by: steveramsey
2 Replies
10. Shell Programming and Scripting
I am obviously missing something here, but the following simple command is giving me problems:
sed 'i\extratext' filename.txt
I receive "sed: command garbled: i\extratext' "
Any suggestions?
Thanks. (6 Replies)
Discussion started by: here2learn
6 Replies