The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-22-2005
Ygor's Avatar
Ygor Ygor is offline
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,226
Seems to work fine...
Code:
$ sed --version
GNU sed version 4.1.4
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

$ head file1 sed1
==> file1 <==
11111'222?'22'33?'333'44444'55555'

==> sed1 <==
s/\([^?]\)'/\1'\n/g

$ sed -f sed1 file1
11111'
222?'22'
33?'333'
44444'
55555'
Reply With Quote