Hello all,
heres whats up:
i'm trying to script a lil piece to execute in terminal
so when i type something like:
scriptname textfile
the script searches the text file, replaces charecters of my choosing with charecters of my choosing
"sed" im told is the way to go, and i got summat like this going
Code:
#!/bin.sh
bash -c "sed -i.backup -e /s/char/newchar/"
(if need be, i think i can just add another line of "-e /s/char/newchar/" if i need to target more charecters or words as needed.)
the issue with the above code. . . how do i get it to target whatever text file follows the command? without having to manually designate sed to it each time?
e.g. in commanding:
scriptname textfile
how do i get the script to target textfile^^^?
much thanks, and obbvs, im a n00b.