help on "sed" deletion

hi guys,

I am get in trouble with Sed

I have a file like this:

E.n...@..57/00020/R/53/A///A2.
E.nfe.d..@..47/000/df/ f20//R/53/A///A2.

I have to delete just until 2 char before first /

Eg.

57/00020/R/53/A///A2.
47/000/df/ f20//R/53/A///A2.

but this one doesn't work finely cause it cut off at the first /

sed -n 's/[^\/]*//p'

...is there a way to do this??

tnks in advantage!

 
sed 's/.*@..\(.*\)/\1/g' input_file 
1 Like

If you have GNU grep:

grep -o '..\/.*' infile
1 Like

cool tank you A lot!!!

It is what i need!!! :slight_smile:

---------- Post updated at 10:48 AM ---------- Previous update was at 10:41 AM ----------

seems it work also in thi way
sed -n 's/[^\/]*[..]//p'

:o