Rosia Evans

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:

  1. $var%? removes the last character, in a string do "this is a string ${var%?}"

Webrings

<- aber_webring ->
<- fediring ->