bash script deleting rows
Hi all, I have to create a bash script doing the following: ask in input a string, find that string into a file, then delete the all rows containing that string. Someone can kindly help me? I'm not so expert in scripting, I know linux commands.
|
Is this a homework? What have you tried so far? If you know linux commands then you should be able to solve the problem.
|
Google the following:
"bash read" or "positional parameters" and "sed" |
grep and sed are good ones, maybe just sed for the find and delete part. post what you come up with.
input is easy, from groogle search #!/bin/bash # This script will test if you have given a leap year or not. echo "Type the year that you want to check (4 digits), followed by [ENTER]:" read year |
All times are GMT -5. The time now is 06:46 AM. |