shell script to...
Neil Greene
neil at ms.uky.edu
Wed Apr 10 06:25:47 AEST 1991
Any sed gurus that would like to explain how to accomplish the following. I
have not masterd the art of sed or awk.
I have a file that contains drug names and next to the drug name is the drug
group.
> Dipyrone Analgesic
> Nefopam Analgesic
> Thiosalicylic Acid Analgesic
> Xylazine Analgesic
> Chloramphenicol Antibiotic
A need a shell script that will read from another (ascii) data file, find an
occurance of a DRUG_NAME, write the line to another (ascii) file and append
the appropriate DRUG_TYPE to the new line.
# line with drug name in it
xxxx 01/02/90 xxxxxx xxxxx xxx x xxxxxxx Dipyrone .... xxxx xxxxx
# rewrite new line to new ascci file
xxxx 01/02/90 xxxxxx xxxxx xxx x xxxxxxx Dipyrone .... xxxx xxxxx Analgesic
--
Neil Greene --- University of Kentucky Mathmatics and Sciences
University of Kentucky Computing Center
neil at graphlab.cc.uky.edu [NeXT Attachments]
More information about the Comp.unix.questions
mailing list