Problem:
--------
I am trying to remove a userid and name from a file once the user has specified the userid or name to remove.
Sample Code:
------------
#!/bin/sh
echo Enter a userid or name to search for and remove:
read wrd
grep -w $wrd ~/test | cut $wrd
Notes:
------
Im using grep -w cause it returns the whole line containing both the usrid and full name depending on what the user searchs by. I wanted to pipe this through cut but I guess cut doesnt work on files in this way.
--------
I am trying to remove a userid and name from a file once the user has specified the userid or name to remove.
Sample Code:
------------
#!/bin/sh
echo Enter a userid or name to search for and remove:
read wrd
grep -w $wrd ~/test | cut $wrd
Notes:
------
Im using grep -w cause it returns the whole line containing both the usrid and full name depending on what the user searchs by. I wanted to pipe this through cut but I guess cut doesnt work on files in this way.