Hi
ok it works, but in some case I have the second filed with the title with comas...
So the sed sed 's/,.*,/,/'drop the rigth part of the title...
Exemple:
000000001 260 L $$aVIENNA :$$bIAEA, SECOND INFO, 1988,$$c1988.
Hi Aia
thanks for the exemple...
It still don't works for all the records. Look this exemple:
Where SAN DIEGO is the first field (no problem with it)
and where ACADEMIC PRESS, INC.;1989;SAN DIEGO, CALIFORNIA 92101
is the second filed...
SAN DIEGO;ACADEMIC PRESS, INC.;1989;SAN DIEGO, CALIFORNIA 92101
If I pass your script I have this:
$$aSAN DIEGO :$$bACADEMIC PRESS, INC.,$$c1989.
SAN DIEGO, CALIFORNIA 92101 is missing then...
Maybe there is a way to get just 4 digits as a date?
I try this but it do not works:
sed -i '/[0-9]\{9\} 260 L/s/, [0-9]\{4\},/,/g' biblio1.mrk_aleph_sec.dat
So at the beginning of your post the field separator was "," now in your SAN DIEGO sample line, the field spearator is now ";" ... what's going on ?
Could you please provide a representative input file containing all the case of line formating possible you want to filter and give us what output file sample you expect, then maybe people will be able to help
$ echo 'SAN DIEGO :ACADEMIC PRESS, INC.;1989;UNIVERSITY CAFILORNIA' | sed 's/\([;,]\)[ 0-9]*\1/\1/'
SAN DIEGO :ACADEMIC PRESS, INC.;UNIVERSITY CAFILORNIA