and then i'll type single quotes inside the single quotes i will type s because i want to search for a string and then slash pineapple slash and then i don't know let's go with feta and then what we need to do is give the sed command a file that we want to use for input and i'm going to use the URL_TOKEN file that i showed you guys earlier and take a look every occurrence of pineapple has indeed been changed to feta it worked video over you could go on about your day it was that easy actually it gets a little bit more advanced from here let's continue on a bit so one thing that didn't happen is that the file itself didn't get modified so what the sed command did here when we executed it is it used the URL_TOKEN file as an input file and then it executed this find and replace against every occurrence of pineapple and it changed every occurrence to feta now what happened here is that it didn't actually overwrite the file it just well gave me the contents of the file the contents of the file with the changes now what i could do i'm not going to do this but what i could do is i could simply redirect the output to a new file i mean that's fine and it's valid but that's not really what i want to do here instead what i want to do is change everything in place and that's actually very easy we just add one option here dash i allows us to change things in place this time there's no output but we can see that there was in fact output the output was the file itself that's where the output was sent to so we were able to change every occurrence of pineapple to feta inside the file so crisis resolved now already with what i've taught you you could use this command syntax right here to do all kinds of things i mean anytime you want to basically find and replace something with something else you could use this exact syntax right here you just change the word that you're searching for the word that you want it changed to and then you also change the name of the file that you want to make the changes in you include the dash i option if you want everything to be done in place and that alone will probably serve you for more than NUMBER_TOKEN percent of all the use cases you might use said for again there's many variations but there's also another problem and that problem comes in the form of a delimiter
NO_SEGMENT_TOKEN