I'm trying to run the sed command in bash but it keeps giving me errors, I don't know what I did wrong.
This is the code: $sed 's/unix/linux/' geekfile.txt
and this is the error message: bash: s/unix/linux/: No such file or directory.
I tried adding -i
and it told me the command is not found. I don't know what to do.
Here is a screenshot of what I am facing:
's/unix/linux'
as a file input which is strange. Is there anything between thesed
and the's/unix/linux'
bit.$
(which is meant to represent the shell prompt) - this causes the shell to expand$sed
as a (presumably empty) variable, and then your command is becoming's/unix/linux/' geekfile.txt
instead ofsed 's/unix/linux/' geekfile.txt