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 :: Running shell scripts 
::  
::  
::  
::  
::  
Shell :: command to add comment to a user info 
Shell ::  
Shell ::  
:: install extensions devcontainer.json for codespaces 
:: Git pull is ahead by x commit 
:: Could not execute because the application was not found or a compatible .NET SDK is not installed. 
Shell ::  
Shell :: pushing to 2 repositories 
Shell :: stop ubuntu(v22.4) from killing apps unexpectedly 
Shell :: grep -R exlude directory 
Shell :: copy linux command with all hiden files 
Shell :: timotei felvinczi githbun 
:: activating virtual environment in linux access denied 
Shell :: fork, remote setup, link 
Shell ::  
:: windows command count output lines 
Shell :: powershell read registry value remote computer 
Shell :: install adoptium openjdk ubuntu 
Shell :: Initialize Git repository with different name 
Shell :: linux index.html datei auflistung alle dateien 
::  
::  
Shell :: Using 32768KiB of shared memory for nchan 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =