How to remove the complete line?

Hello

This is my first post in this site

I have the next txt file "Employee.txt" with the next data

ID Name      Department Salary
1  Alejandro IT                1000
2  Alan         HR              3000
3  Lupe        IT                2500
4  Lili           Desing        1500

i need to create a script in Unix, the user has to provide the Id to remove from the file.

For example, if the use type id=3, then i have to remove the complete line from the file,

results:

ID Name      Department Salary
1  Alejandro IT               1000
2  Alan         HR             3000
4  Lili           Desing        1500

i hope you can help me, thank you and regards

egrep -v "^3 " <filename>

when you create your script and use a var name of id, by example, it would be something like...

...
id=${1}   #if id is passed as argument 1
egrep -v "^${id} " <filename>
...

just to be a little more careful

egrep -w -v "^3" <filename>

would be little more safer. I do see a space/tab in the above regex, but a -w will ensure you are deleting like that as your id as the first 'word'

The question sounds like a homework assignment.

Also looks like OP is interested in a shell script not any utility.