shell script that add and delete lines from a file
$30-100 USD
In Progress
Posted over 17 years ago
$30-100 USD
Paid on delivery
Hello, I need two shell scripts, one can add lines to a file use variable such as $domain, and the other shell script can delete lines in the file use similar variable such as $domain.
The file will contain records format as:
IPaddress Domain
[login to view URL] [login to view URL]
[login to view URL] [login to view URL]
[login to view URL] [login to view URL]
[login to view URL] [login to view URL]
[login to view URL] [login to view URL]
[login to view URL] [login to view URL]
...
The script that adds have to do a search first see if the exact record exists or not, if not, then append it to the end of the file.
The script that deletes also have to do a search first see if the exact record exists or not, if exist then delete the record.
For example, the variable $domain passed in is [login to view URL], then the add script will need to append "[login to view URL] domain.com" without the quotes at the end of the file, the delete script will need to search for "[login to view URL] domain.com" this exact string and if a line match it exactly then delete that line.
Budget will be low since the project should be simple.
Thanks