SED for delete the point


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SED for delete the point
# 1  
Old 10-13-2009
SED for delete the point

Hello
i need to use sed for delete all row that begin with "."

i try whit

sed -e /^[\.]/d

but it don't work



help me please Smilie

Last edited by tor; 10-13-2009 at 12:24 PM..
# 2  
Old 10-13-2009
Should be something like:

Code:
sed '/^\./d'

# 3  
Old 10-13-2009
Quote:
Originally Posted by Franklin52
Should be something like:

Code:
sed '/^\./d'


i try it but

sed '/^\./d' don't work

sed /^\./d delete all row of the file apart one Smilie
# 4  
Old 10-13-2009
what OS and sed are you using because its working fine..
Code:
home> cat vv
. hi
hello
. fine
ok...
home> sed '/^\./d' vv
hello
ok...

# 5  
Old 10-13-2009
Quote:
Originally Posted by tor
i try it but

sed '/^\./d' don't work

sed /^\./d delete all row of the file apart one Smilie
This is what I get:

Code:
$ cat file
line without a dot at the begin of the line
.line with a dot at the begin of the line
line without a dot at the begin of the line
line without a dot at the begin of the line
.line with a dot at the begin of the line
line without a dot at the begin of the line
$ sed '/^\./d' file
line without a dot at the begin of the line
line without a dot at the begin of the line
line without a dot at the begin of the line
line without a dot at the begin of the line
$

# 6  
Old 10-14-2009
Quote:
Originally Posted by tor
I'm writing a BATCH file under windows XP sp3 (and i'm using unixutils)
after diff command i must format the output of diff whit sed
couse i need to delete all supplementary information that the diff command do Smilie
UP
i need too format the output of diff command
this is the output example :

Quote:
diff -erP C:\dir1\file1 C:\dir2\file2
0a
text
text
text
.
i need this output after sed command or after some option of diff:

Quote:
text
text
text
help meee Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to create a new mount point with 600GB and add 350 GBexisting mount point? IN AIX

How to create a new mount point with 600GB and add 350 GBexisting mount point Best if there step that i can follow or execute before i mount or add diskspace IN AIX Thanks (2 Replies)
Discussion started by: Thilagarajan
2 Replies

2. Shell Programming and Scripting

sed to delete ^M

I am trying to use sed to delete the ^M at the end of the line and when i pass a file './asciiFix.sh wintest.txt' I get an error saying sed: can't read : no such file or dir. Can someone give me a pointer as to what I am doing wrong? #!/bin/sh if file "$@" | grep "with CRLF"; then echo... (5 Replies)
Discussion started by: kwatt019
5 Replies

3. Shell Programming and Scripting

How to perform a hexdump using dd from start point to end point?

hi, I would like to ask or is it possible to dump a hex using dd from starting point to end point just like the "xxd -s 512 -l 512 <bin file>" I know the redirect hexdump -C but i can't figure it out the combination options of dd. Hope someone can share their knowledge.. Thanks in... (3 Replies)
Discussion started by: jao_madn
3 Replies

4. UNIX for Dummies Questions & Answers

What happen if we delete the parent mounting point

Hi Friends I Have a question about mounting point This is a output of df -g I wanted to delete the first FS /dev/lvdb2inst1 which is mounted on /db2/db2ins1 http://i43.tinypic.com/35in6ts.jpg Here my question is, if we delete the first FS , are other two FS are unaccessble as all 3 ... (1 Reply)
Discussion started by: atul9806
1 Replies

5. Shell Programming and Scripting

sed problem with double point

I have a problem with the next text 00:00:27,761 --> 00:00:31,094 MADSO: Boston. Southie. I was born here. 00:00:31,197 --> 00:00:36,692 Never left. Never had any reason. Good friends, plenty of girls. -------------------------------------------------- I want delete MADSO: and... (3 Replies)
Discussion started by: thailand
3 Replies

6. Shell Programming and Scripting

sed-delete

Guys, file1: test \ 123 cat file1 | sed '/test \/d' ---- does not work I have to remove the line "test \" in file1 can somebody help ? (7 Replies)
Discussion started by: giri_luck
7 Replies

7. Shell Programming and Scripting

sed to extract only floating point numbers from HTML

Hi All, I'm trying to extract some floating point numbers from within some HTML code like this: <TR><TD class='awrc'>Parse CPU to Parse Elapsd %:</TD><TD ALIGN='right' class='awrc'> 64.50</TD><TD class='awrc'>% Non-Parse CPU:</TD><TD ALIGN='right' class='awrc'> ... (2 Replies)
Discussion started by: pondlife
2 Replies

8. UNIX for Dummies Questions & Answers

Delete ^ using sed

Hi All, I am very new to UNIX... I was trying to delete ^ from a file and save it with different name... The version is AIX 5.3 The input file is in this directory /a/b The Input file name is o9876.out I want the output file in same path with different name like ABC.txt... (5 Replies)
Discussion started by: us_pokiri
5 Replies

9. UNIX for Dummies Questions & Answers

Delete line till certain point

Hi, I have a requirement to delete a line till a certain word. Am not sure how to do it e.g I want to delete till the bold character since start of line. Any help is higly appretiated. (2 Replies)
Discussion started by: inq
2 Replies

10. UNIX for Advanced & Expert Users

Fibre connection Point to Point SUN

Anyone know of a guide or instructions for Solaris I got to configure a SBUS HBA to talk to a tape robot. I have done this on a switch but not point to point. just going HBA >>>>> TAPE Fibre simple two nodes Kie (6 Replies)
Discussion started by: kie
6 Replies
Login or Register to Ask a Question