Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

command to display the 3rd line of a file

# Take the last line of the top three lines 
head -n 3 my.txt | tail -n 1 
 
# Tell sed to "be quiet", and print just the third line 
sed -n 3p my.txt 
 
# Tell sed to delete everything except the third line 
sed '3!d' my.txt 
 
# Tell awk to print the third input record of the current file 
awk 'FNR==3 {print}' my.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: git bash in cmd 
Shell :: pull everything git 
Shell :: git squase to rename author 
Shell :: windows mac address ethernet 
Shell :: ssh current directory 
Shell :: insomnia 
Shell :: expo app size 
Shell :: vim delete every other line 
Shell :: Move folder content up a level using bash/shell 
Shell :: /bin/bash^M: bad interpreter: No such file or directory 
Shell :: how to uninstall cuda 
Shell :: ssh into directory 
Shell :: rename a directory in git 
Shell :: install spotify on ubuntu 
Shell :: .bat script on computer startup 
Shell :: gzip folder with tar and exclude directories 
Shell :: shell script tutorial 
Shell :: deletes lines including regex match 
Shell :: git basic commands 
Shell :: sonarqube linux installation 
Shell :: bash substract varible 
Shell :: git rebase branch 
Shell :: uname linux 
Shell :: how to delete branch on git 
Shell :: conda install django-cors-headers 
Shell :: sublime text linux 
Shell :: how to connect my ubuntu server to ssh 
Shell :: what is git rebase 
Shell :: Add OMV repository ro Debian 
Shell :: renaming a file in linux 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =