Bash
Quick Tip: Get Absolute Path to Directory Script is Running in
When running a bash script, it’s sometimes convenient to get a fully qualified path to the directory that the source of the running script is in.
I continually have to remind myself of the exact syntax for this tip, so I’ve posted it for posterity. This approach should work around most issues of symlinked files, sourced files, etc.
Tuesday, January 17, 2023
Quick Tip: Run Bash Commands in Parallel
I have a useful script that demonstrates a few different bash techniques.
This script:
- Executes multiple commands on multiple SSH client hosts
- Connects to each host in parallel, and waits for all host processes to terminate
- As a freebie, demonstrates running apt in a non-interactive process
Wednesday, May 18, 2022
Up to all Tags