Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash use cat in sed command

# Basic syntax:
sed 's/<search_text>/'"`cat replacement.txt`"'/' your_file
# Where:
#	- The replacement.txt file contains a single line that will be used
#		to replace the search_text, where found in your_file. 
# Note, this isn't very useful unless combined with other functions like
#		find exec, e.g.:
find *.txt -exec sed -i 's/search_text/'"`cat replacement.txt`"'/' {} ;
Comment

PREVIOUS NEXT
Code Example
Shell :: ubuntu measure execution time 
Shell :: download torrent in linux terminal 
Shell :: install aws cli mac 
Shell :: how to give all permission to a directory in linux 
Shell :: size of a file linux 
Shell :: renew ssl certbot nginx 
Shell :: vim save read only file 
Shell :: git commit back in time 
Shell :: git command line see logö 
Shell :: docker sleep infinity 
Shell :: install discord in linux 
Shell :: windows usb serial number 
Shell :: update and upgrade ubuntu 
Shell :: remove last commit git 
Shell :: kill process on port 
Shell :: grep multiple strings 
Shell :: git ignore users permissions 
Shell :: problema hora windows ubuntu 
Shell :: remove unused images docker manually 
Shell :: code ENOLOCALnpm ERR! Could not install from "android" 
Shell :: how to open pdf from ubuntu terminal 
Shell :: bash loop lines in file 
Shell :: sqlmap POST request injection 
Shell :: how to revert back to previous commit in git 
Shell :: Failed to start firewalld - dynamic firewall daemon. 
Shell :: remove first word of pipe output 
Shell :: shell replace substring 
Shell :: Get pid of process that created a specific window 
Shell :: connecting sublime to bash command line 
Shell :: how do i get the last commit 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =