Hi Guys,
I apologise if the Heading might be incomplete or misleading, but didnt know how to word it.
I can do basic to intermediate shell scripting ( I think ) but I need some LQ help with this one.
So I have a text file with about 10 000 lines. Each line containes a description of medical item. In certain cases the first 20 characters of the description is excactly the same.
Code:
WHIN HUBER NEED G20X3/4"(19MM)
WHIN HUBER NEEDLE 19X1INC
WHIN HUBER NEEDLE 20G 1/2 40MM
WHIN HUBER NEEDLE G20 1"
WINGED INFUSION CONTINUO 23G
WINGED INFUSION CONTINUO 25G
WINGED INFUSION INTERMIT 21G
WINGED INFUSION INTERMIT 23G
WINGED INFUSION INTERMIT 25G
WISE GUIDE CATHETER 7F AL2
WISE GUIDE CATHETER 7F FL4
WISE GUIDE CATHETER 7F FR4
WISE GUIDE CATHETER 7F FR5
WISE GUIDE CATHETER 7F MP1
WISE GUIDE CATHETER 7F Q3.5
WISE GUIDE CATHETER 7F Q4
WISE GUIDE CATHETER 7F VL4
The first 20 characters of one of the Descriptions would be
WISE GUIDE CATHETER.
What I want to achive is to output only the descriptions where the first 20 characters are the same to a different text file.
For example, taken the Items above,
WHIN HUBER NEEDLE wont be in the output file, because the first 20 characters are not the same.
But
WINGED INFUSION CONTINUO, WINGED INFUSION INTERMIT,WISE GUIDE CATHETER would be in the output file.
Hope im making sense.
Karel