I have a .txt file with bookmarks and all bookmarks above 100 have to be placed 2 pages down from where they are now, because I added two pages in the document. How do I write a bash script that adds 2 to all integers it finds in the document?
I'm new to writing code in general, but I already know that I should make a for loop to read each line, then determine if each word is an integer or not and then with an if statement add 2 to each integer above 100.
The problem is that i don't exactly know how to access (read and write) to the file and I also don't know how to determine if something is a number or not.
Aucun commentaire:
Enregistrer un commentaire