10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file similar to the below. I am selecting only the paragraphs with @inlineifset.
I am using the following command
sed '/@inlineifset/,/^ *$/!d;
s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln
This produces
@section Correlations between
seismograms,,,,}}
... (5 Replies)
Discussion started by: Danette
5 Replies
2. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
3. UNIX for Dummies Questions & Answers
Hi Everybody! First post! Totally noobie.
I'm using the terminal to read a poorly formatted book.
The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this.
I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies
4. Shell Programming and Scripting
Hello.
I'm writing a script where every file you create will generate a md5sum and store it into a text file.
Say I create 2 files, it'll look like this in the text file:
d41d8cd98f00b204e9800998ecf8427e /helloworld/saystheman
d41d8cd98f00b204e9800998ecf8427e /helloworld/test
I... (3 Replies)
Discussion started by: batarangs_
3 Replies
5. Shell Programming and Scripting
How do I remove line that do not contain text, but that do contain tabs?
I have tried the command
cat file | awk NF
but that doesn't work when the lines contain tabs (and spaces).
I have also tried:
cat file | sed '/^$/d' (9 Replies)
Discussion started by: locoroco
9 Replies
6. UNIX for Dummies Questions & Answers
How do you remove trailing empty lines at the end of a text file? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
7. Shell Programming and Scripting
Hi
Does anybody know of a command that will enable me to remove all entries in a file that have the format (name & time)
more testfile
anthony 2003
anthonyr 2008
amorel 15:00
anthonyp 14:35
anthonyp 14:35
anthonyr 2008
ardean 13:28
arlene 2003
arlenem 08:15
arlenem 08:15... (5 Replies)
Discussion started by: jamba1
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I'm trying to remove multiple lines of text based off a series of different words and output it to a new file
The document contains a ton of data but i want to delete any line that has the following
mx1.rr.biz.com or ns2.ri.biz.com
i tried using grep -v filename "mx1.rr.biz.com" >... (3 Replies)
Discussion started by: spartan22
3 Replies
9. Solaris
I have a text file with rows of information (it is basically a ls command information(o/p from ls command))
I need to remove the lines ending with a .cnt extension and keep the lines ending with .zip extension, how to accomplish this.
I also only need the date,size and name of the file from every... (2 Replies)
Discussion started by: ramky79
2 Replies
10. Shell Programming and Scripting
Hi Gurus,
I'm a little new to UNIX. How can I do remove the first and last line in a file? Say, supppose I have a file as below:
Code:
1DMA
400002BARRIE
401002CALGARY/LETHBRI
402002CARLETON
500001PORTLAND-AUBRN
501001NEW YORK, NY
502001BINGHAMTON, NY ... (2 Replies)
Discussion started by: naveendronavall
2 Replies