Bash

0 ▲
26 minutes ago · Tech · hide

Bash Bash is insane and super useful. Heres a few tips to get you going, stranger Loops Loop through all files with: for file in path/to/files/* do echo $file done Loop through all but one file with: for file in path/to/files/!(not_this_one.txt) do echo $file done Loop through lines in a file using: while read line do echo $line done < file_to_read.txt Weird little shorthands Alter variables in place using clever little things like: $var%? removes the last character, in a string do "this is a string ${var%?}"

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town