Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to find and replace a string in a file using shell script on mac

# replaces ALL(g i.e. global) ouccurences of "original_string" with "new_string", 
# in the file file_name.ext_name
sed -i '' "s/original_string/new_string/g" file_name.ext_name
Comment

PREVIOUS NEXT
Code Example
Shell :: Zathura not displaying any documents 
Shell :: Deploy all file and subfolder git cpanel 
Shell :: bash find only first answer 
Shell :: kill apache 
Shell :: install kubenertes using chocolatey 
Shell :: hardhat contract verify 
Shell :: npm install discord.js 
Shell :: check jitsi ubuntu version 
Shell :: install werkzeug 
Shell :: python.h missing 
Shell :: run tmux on startup 
Shell :: ubuntu get public ip 
Shell :: dpkg: error processing package gitweb (--configure): installed gitweb package post-instal 
Shell :: telegram desktop for linux 
Shell :: install pyqt5 designer 
Shell :: git remove .ds_store from commit 
Shell :: GIT Error refname refs/heads/master not found 
Shell :: git log with numbers 
Shell :: awk count if 
Shell :: chmod read only command in linux 
Shell :: brew error 
Shell :: You must install at least one postgresql-client-<version package 
Shell :: print unique lines 
Shell :: Run emulator without Android studio. 
Shell :: how to I list powershell functions 
Shell :: windows 10 openssh server install failed 
Shell :: how to unstash git stash 
Shell :: shell find string in directory 
Shell :: cdo mean of multiple files 
Shell :: find application path ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =