Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sed commands

# -i here update the file, try with and without -i, 
sed -i -e '/yourpattern/,$d' file # delete everyhing afer the pattern
sed '/yourpattern/d' file   #delete pattern containing line
sed -i -e "/your_pattern/,+2 d" file  # 2 lines after the pattern
sed -i -e "5,5d" file # remove 5th line
sed '10,$d' pes.com # delete everything after 10th line
sed '7,36!d' tmp.com > tmp_coord # specific lines to a file
sed -i '$d' file # delete last line
sed -i -e '29,36d' pes.com delete specific lines 
sed -i -e '78r../../insert_file' File_you_change.txt   #sed interst lines to a file
sed 's/^........//' delete chars 1st to x in ANY line, ... = charachters 
Comment

PREVIOUS NEXT
Code Example
Shell :: turtlebot installation 
Shell :: check on cmd all installed version 
Shell :: remove htaccess files in all folders linux 
Shell :: rename files linux 
Shell :: linux zip file without parent directory 
Shell :: install serverless-google-cloudfunctions 
Shell :: fetch from remote branch 
Shell :: To set the exit status of a shell script 
Shell :: clear pagespeed cache 
Shell :: how to setup pre commit hook on my local 
Shell :: ubuntu delete all virtual hosts 
Shell :: git use stash on another computer 
Shell :: git add and commit in one command 
Shell :: upload transfer.sh 
Shell :: kill background job 
Shell :: cmd to find find file 
Shell :: mongoalchemy flask 
Shell :: redux 
Shell :: bash substitution 
Shell :: laserjet m1132 mfp driver linux mint download 
Shell :: bash index of string 
Shell :: how to pass docker hub credentials for k8s pods 
Shell :: sort unix 
Shell :: jenkins download 
Shell :: swagger editor locally 
Shell :: append newline to file 
Shell :: apt upgrade full 
Shell :: git merge conflict resolve 
Shell :: failed: Invalid argument 
Shell :: git clone without project folder 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =