I am looking to scan a file for particular strings to add to a command to be executed.
The string will always be after a certain group of characters and between : and ).
The string to be used in the command shows up multiple times in the file.
I'm new to scripting.
for instance:
a;sdlkfjas;dlfksdj (fsfd: 1111111)
asdasf
ewrwea
qawerws
aswerwea (asf: 594830)
I want 1111111 and 594830 to be added to the command. I'm sorry for not using correct terminology but I have forgotten many of the terms that I learned in Computer Science.
just an example: sudo gedit 11111111
I can't remember if you call them arguments but they are variables inside the function.
Thanks
The string will always be after a certain group of characters and between : and ).
The string to be used in the command shows up multiple times in the file.
I'm new to scripting.
for instance:
a;sdlkfjas;dlfksdj (fsfd: 1111111)
asdasf
ewrwea
qawerws
aswerwea (asf: 594830)
I want 1111111 and 594830 to be added to the command. I'm sorry for not using correct terminology but I have forgotten many of the terms that I learned in Computer Science.
just an example: sudo gedit 11111111
I can't remember if you call them arguments but they are variables inside the function.
Thanks
Comment