Article View: ca.unix
Article #1104help w/ awk
From: Derek
Date: Fri, 07 Apr 1995 00:00
Date: Fri, 07 Apr 1995 00:00
28 lines
1454 bytes
1454 bytes
We are in a pickle here and need some help. We want to
take each line in a file that looks like:
"john "," Smith"," ","Fresno, CA"
and strip the stuff to look like:
"john","Smith","","Fresno, CA"
In SCO Unix I use the statement:
awk '{gsub(" "," ");print > "newfile"}' oldfile
using different variations of the gsub( , ) statement to
strip out the blank stuff. However on a system running
Unix Texas Instruments SYStem V, it doesn't understand the
gsub( ,) statement.
Do you have any suggestions of awk statements that can
do the search and replace i'm suggesting ??
Please respond by direct e-mail if possible to
dereks@cs.osiris.csufresno.edu
OR
6500derk@ucsbuxa.ucsb.edu
Thanks.
Derek
Technical Details
Message-ID:
<3m4fup$34r@ucsbuxa.ucsb.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,5d17b089692aaf89,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: 10183f,5d17b089692aaf89,start X-Google-Attributes: gid10183f,public X-Google-Thread: faae6,5d17b089692aaf89,start X-Google-Attributes: gidfaae6,public X-Google-Thread: 10f717,5d17b089692aaf89,start X-Google-Attributes: gid10f717,public From: 6500derk@ucsbuxa.ucsb.edu (Derek) Subject: help w/ awk Date: 1995/04/07 Message-ID: <3m4fup$34r@ucsbuxa.ucsb.edu> X-Deja-AN: 100060766 distribution: ca organization: University of California, Santa Barbara keywords: awk, help, size, transfers newsgroups: ca.unix,comp.unix,comp.unix.questions,fj.questions.unix