06-16-2009
Wow, thanks for the 2 quick responses.
I tried both and wound up with blank output files. Looking back at the original file, every numeric line has 2 spaces before the numbers start....is it possible to add that into the expression? I looked for how to represent a space in regular expressions but came up with 8 or 9 different syntax...
P.S. I don't think I've ever seen the true value of consistently formatted files but I sure do now.
P.P.S. Again thanks for the help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How would I delete white spaces in a specified file?
Also, I'd like to know what command I would use to take something off a regular expression, and put it onto another.
ie.
.
.
.
expression1 <take_off>
.
.
.
expression2 (put here)
.
.
.
Any help would be great, thanks! (10 Replies)
Discussion started by: cary530
10 Replies
2. Shell Programming and Scripting
How can i clear all space characteres for a long file at the end of each line? (3 Replies)
Discussion started by: osymad
3 Replies
3. UNIX for Dummies Questions & Answers
Hello Guys,
I am a newbie to unix. I am having a requirement. Please help me for finding a solution for this,
I am having a file as mentioned below:
$ cat shank
ackca
acackac akcajc akcjkcja akcj
ckcklc
I want to delete all the white spaces in this file,
I tried... (2 Replies)
Discussion started by: mraghunandanan
2 Replies
4. Shell Programming and Scripting
I need some help deleting lines in a file that contain spaces. Im sure awk or sed will work but i dont know much about those commands. Any help is appreciated :D (7 Replies)
Discussion started by: r04dw4rri0r
7 Replies
5. Shell Programming and Scripting
Hi,
I have a file such as:
---
>contig00001 length=35524 numreads=2944
gACGCCGCGCGCCGCGGCCAGGGCTGGCCCA
CAGGCCGCGCGGCGTCGGCTGGCTGAG
>contig00002 length=4242 numreads=43423
ATGCCGAAGGTCCGCCTGGGGCTGG
CGCCGGGAGCATGTAGCG
---
I would like to concatenate the lines not starting with ">"... (9 Replies)
Discussion started by: s052866
9 Replies
6. Shell Programming and Scripting
Title says all :p
Thanks for your help (4 Replies)
Discussion started by: drbiloukos
4 Replies
7. Shell Programming and Scripting
I want to remove the trailing spaces at the end of each line starting from a particular position(using ksh script). For example, in the attached file, I want to remove all the spaces starting from the position 430 till the end. The space has to be removed only from the 430th position no matter in... (3 Replies)
Discussion started by: Suryaaravindh
3 Replies
8. Shell Programming and Scripting
Hi,
I have multiple files of same format and I want to delete the lines starting with # and The from all of them
I am using
egrep -v '^(#|$)'
for # but unable to do for both # and The
Please guide
Thanks (12 Replies)
Discussion started by: bioinfo
12 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
The shell script is currently using the below command to find the seven days older files from a directories and delete them.
Issue occurs when the file name consists of space in them. eg: abc def 1245.txt
I need to delete the files names with space also. Please help.
Thanks.
Below... (7 Replies)
Discussion started by: abhi_123
7 Replies
10. UNIX for Dummies Questions & Answers
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies