bashoneliners.com

Welcome to bashoneliners.com, a curated collection of practical and well-explained Bash one-liners, snippets, tips and tricks. We aim to make each published one-liner to be of high quality: useful, easy to read, follows best practices, with clear, detailed, accurate explanation. These one-liners should help you automate tasks, troubleshoot problems, whether it be in system administration, file management, networking or programming.

Download a URL with cookies set on the command line with curl

curl -b "session=$session" 'https://adventofcode.com/2023/day/18/input'

December 18, 2023bashoneliners

Inspect the HTTP headers of a website

curl -I amazon.com

February 8, 2019bashoneliners

Get the latest Arch Linux news

w3m https://www.archlinux.org/ | sed -n "/Latest News/,/Older News/p" | head -n -1

August 15, 2017Jab2870

Force the preferred language when downloading a web page with wget

wget -–header='Accept-Language: en-us' http://www.timeanddate.com/calendar/index.html?year=2008&country=26 -O calendar.html

August 21, 2011bashoneliners