Skip to content

Latest commit

 

History

History
97 lines (59 loc) · 6.45 KB

2023-kw22.md

File metadata and controls

97 lines (59 loc) · 6.45 KB

Log calendar week 22 / 2023

Input

Tools

Reminder, refresher and TIls of the week

Get number of files in (large) dir and subdirs more: fd | wc -l


Some awk from: https://keentolearn.medium.com/linux-cheatsheet-for-devops-e4f4cd4631aa

pass the pattern ‘INFO’ and condition to print columns 1, 2, 3, and 6 of a log file:
awk '/INFO/ {print $1 $2 $3 $6} logfile.txt

This will split on delimiter and print the values of columns 1 and 3 in the output:
awk -F',' '{print $1, $3}' fruits.txt

This will split on delimiter and then the marks of students and will print their names if marks are greater than 75:
awk -F',' '$2 > 75 {print $1}' marks.txt

reveal.js standalone presentation (deploy a single file):

pandoc --standalone --self-contained -t revealjs input.md -o output.html -V reveal.js-4.5.0\js\reveal.js --include-in-header=style.css -V theme:dracula  

Convert json.txt to yaml with yq and pipe it to vim:

yq eval -P "json.txt" | vim -