News

2. Global replacements To replace every instance of a certain word in a file, you would need to use a command like the one shown below where the “g” means “global”. The command will change ...
sed -i 's/num1 =.*/num1 =200/' code.py This SED command will find the variable “num1” and then will enter the new value as “200”. After executing the command, display the file content by typing: cat ...