Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

cat with line numbers

cat -n text.txt
Comment

cat to line number

$ cat -n file | awk '$1>=4 && $1<=8 || $1==12 || $1==42'
 4  Line 4
 5  Line 5
 6  Line 6
 7  Line 7
 8  Line 8
12  Line 12
42  Line 42
Comment

cat to line number

awk 'NR==1' file.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: cannot open display: localhost:0.0 
Shell :: see unimported react comp. 
Shell :: What is the login id in putty for ubuntu 
Shell :: linux add myself to dialout group 
Shell :: install htop sudo add-apt-repository universe 
Shell :: How to install very_good_cli in flutter 
Shell :: iterate over dir and remove file bash 
Shell :: linux ubuntu "jetson Nano" disable ufw firewalld 
Shell :: rsync id_rsa 
Shell :: dfc config shell 
Shell :: ex: push a new local repository to github. 
Shell :: steps of first commit gitlab 
Shell :: ros galactic source 
Shell :: nmap cat file 
Shell :: git log for all branchs for specific user 
Shell :: Linux search manual and list all pages with term 
Shell :: how to do a conditional check in shell 
Shell :: debian auto login 
Shell :: terminal snap changes check percentage 
Shell :: nx scaffolding 
Shell :: space as delimiter in cut command 
Shell :: make your react an electron desktop app 
Shell :: docker run +"--entrypoint" args 
Shell :: install web3modal 
Shell :: mount android device [using simple-mtpfs] in linux 
Shell :: gitbuvcket 
Shell :: mac zhs not found 
Shell :: bash inline operator 
Shell :: how to clear linux terminal 
Shell :: how to create a file and multiple lines to it in unix 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =