4 ms·
Just curious (I agree with you), but what are the s/ and /g for? Samsung and Google?
by colineartheta 6y ago
Just curious (I agree with you), but what are the s/ and /g for? Samsung and Google?
- brod 6y agoI think the OP is using the sed syntax [0] to say: > Now rewrite your entire comment with sonos instead of ubiquiti. [0] https://www.grymoire.com/Unix/Sed.html#uh-6 https://www.grymoire.com/Unix/Sed.html#uh-6
- istjohn 6y agoThat's the syntax for search on replace with sed on Linux.
- inetknght 6y agoGood tools support search and replace. Better tools support regular expressions. https://linux.die.net/man/1/sed https://linux.die.net/man/1/sed
- deleted 6y ago[deleted]
- tinco 6y agoIt's how you do a text replacement in VIM, I believe it's s for substitute, /../ for the regular expression, and g for global, to substitute multiple instances.
- roland35 6y agoDon't forget the % if you are using vim, to make sure you replace on all lines :) :%s/ubiquity/sonos/g
- actimia 6y agoIt is a `sed` command, used to replace (s/) all (/g) instances of the first word with the second.
- brabel 6y agohttps://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/ https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-rep...
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- vishnugupta 6y ago“/s” stands for search and “/g” for “global” replace.