Need help whit a script where I have to input a name and then remove a line where that name is in a file
file ex:
001op;Name;Location;date
002op;Name;Location;date
and so on....
can anybody help me???
thanks
Need help whit a script where I have to input a name and then remove a line where that name is in a file
file ex:
001op;Name;Location;date
002op;Name;Location;date
and so on....
can anybody help me???
thanks
Based on your input (name in field 2 of a semi-colon-delimited file)
read NAME
awk -F";" '
$2 != NAME
' NAME="$NAME" input_file
you can use sed for this
sed -i '/pattern/d' filename
or
cat filename | sed '/pattern/d'
note: pattern is the name you are looking for..
You can use sed for this, but:
Well I really needed it to remove just the line where the name is