Download a URL with cookies set on the command line with curl: curl -b "session=$session" 'https://t.co/I5veJwHZnX'; https://t.co/afIT4oO1EG #bash#linux
Count the lines of each file extension in a list of files: git ls-files | xargs wc -l | awk -F ' +|\\.|/' '{ sumlines[$NF] += $2 } END { for (ext in sumlines) print ext, sumlines[ext] }'; https://t.co/jcJdpIMjub #bash#linux
Replace a pattern in a file in a portable way: f=/path/to/file; sed -e "s/pattern/replacement/" "$f" > "$f".bak && mv "$f".bak "$f"; https://t.co/Y885ncXUMx #bash#linux
Send an HTTP POST request as if submitting an HTML form using curl: curl --data "title=recipe&text=steps123" https://t.co/5u3kR4k08p; https://t.co/nYoFaTwmeo #bash#linux
Check if a version string is in valid SemVer format: re_semver=...; perl -wln -e "/$re_semver/ or exit(1)" <<< "$version"; https://t.co/u0I8OmFudl #bash#linux