Help required in creating a shell script that filters the unwanted pattern

Kindly help,

Suppose i am having a file that has got the following contents. Is there any way (eg. sed command) to remove the (*) (*any number) pattern.

se.bas

tulf.h
(1)
tuna.c
(1)
tunsim.c
(1)
tus.cpp
(1)
vp.c
(1)
vp.h
(1)
vpi.
(1)
vpi.SEQ
(1)
vpi.c
(1)
wr_now_seq.cpp
(1)
xltgrimm.cpp
(4)
xlttulf.cpp
(2)

Currently i am using a shell script to prepare the above document, but i am stuck up with removing the (*) patterns. Once this is solved i will get a list containing the source code names alone.

list=`cat $1`
for x in $list; do
echo $x | sed '/MAINTENANCE/s///g'| cut -c1-19 | sed '/ /s///g'
done

Thanks in advance.:confused::slight_smile:

Try:

sed "/^([0-9][0-9]*)/d" se.bas

Which will search for all lines starting with "(" followed by numbers,
followed by a ")" and delete it.

Most probably one can replace you whole chain of commands by one
sed command.

HTH Chris