Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

add line at beginning of file unix

sed -i '1s/^/your text
/' file #Note the addition of the "
" for concluding the new line after the insertion
Comment

bash append to end of line in file

# Save suffixed file into a new file
sed -e 's/^/suffix/' file > file.new

# Edit file and overwrite with suffixed text
sed -i -e 's/^/suffix/' file
Comment

add line to beginning of file shell script

$ sed -i '1s/^/added text /' file
Comment

PREVIOUS NEXT
Code Example
Shell :: Git in Bash 
Shell :: npm install different version 
Shell :: revert the revert 
Shell :: bash compare numbers 
Shell :: kali linux command download 
Shell :: remove branch git 
Shell :: how to control fan speed of ubuntu laptop 
Shell :: curl with regex 
Shell :: install sonarqube on ubuntu 
Shell :: mac terminal screenshot 
Shell :: ssh config file 
Shell :: apache airflow docker 
Shell :: datadog without agent 
Shell :: shell pipe 
Shell :: how to start xfce4 sudo command 
Shell :: sudo -s su root in one line 
Shell :: delete all files in a folder linux 
Shell :: cmd print Path pretty 
Shell :: pom xml dependency cannot resolve 
Shell :: windows powershell ise 
Shell :: Pipe script to a remote server 
Shell :: how to auto cd into git repo 
Shell :: calenderfx installation 
Shell :: odoo 13 install 
Shell :: winrar script for appending date to archive 
Shell :: tar -cxvf other directory 
Shell :: how to show lines on cat command 
Shell :: shell get given line 
Shell :: kubernetes using hyper v 
Shell :: sed match number of unknow digits 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =