2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by issue9
0

Please try

cat YOURFILE | sed 's/YOURSEARCH//g' > YOURFILE.tmp
mv YOURFILE.tmp YOURFILE

Just replace "YOURFILE" with the name of the file to search in
and "YOURSEARCH" with the string you want to eliminate.

1

Please try

cat YOURFILE | sed 's/YOURSEARCH//g' > YOURFILE.tmp
mv YOURFILE.tmp YOURFILE

Just replace "YOURFILE" with the name of the file to search in
and "YOURSEARCH" with the string you want to eliminate.

OK but i dont know what to remove, its supposed to be a variable.
thanks for the help btw.

Will this syntax help
grep -vx $TELENUMMER nummer.txt >> nummerdelete.txt;;

Edited by Goddan: added info

0

If the file "nummer.txt" contains lines that exactly match the contents of the Variable "TELENUMMER" (no trailing blanks for instance) then these lines would not appear in the file "nummerdelete.txt", all others will.

By the way the two semicola at the end of your code are not necessary.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.