Knowledge Base

308 copy-ready commands with fill-in variables, plus step-by-step installation guides.

Installation Guides 11

Categories

Installation Guides (11)

Tags

9 results

Text Processing

Grep Recursively in Directory

grep -rn "{{pattern}}" {{path}}
#grep #search
3 views 0 copies
Text Processing

Grep Excluding Directories

grep -rn "{{pattern}}" {{path}} --exclude-dir={vendor,node_modules,.git}
#grep #exclude
3 views 0 copies
Text Processing

Replace Text in File (sed)

sed -i 's/{{old_text}}/{{new_text}}/g' {{file}}
#sed #replace
3 views 0 copies
Text Processing

Print Specific Column with awk

{{command}} | awk '{ print ${{column_number}} }'
#awk #column
3 views 0 copies
Text Processing

Sort and Deduplicate Lines

{{command}} | sort | uniq
#sort #uniq
3 views 0 copies
Text Processing

Extract Field by Delimiter (cut)

cut -d "{{delimiter}}" -f {{field}} {{file}}
#cut #delimiter
3 views 0 copies
Text Processing

View First or Last Lines of File

head -n {{lines}} {{file}}
#head #tail
3 views 0 copies
Text Processing

Compare Two Files (diff)

diff -u {{file1}} {{file2}}
#diff #compare
3 views 0 copies
Text Processing

Delete Files Found by find/grep

find {{path}} -name "{{pattern}}" -type f | xargs rm -f
#xargs #find
3 views 0 copies