Uppercase to Lowercase
tr '[:upper:]' '[:lower:]' < inputFile > outputFile
REPLACING TABS WITH SPACES (see also blog post)
perl -p -e 's/\t/ /g' input.c > output.c
CONVERTING BULK IMAGES FROM JPG TO PNG
#!/bin/bash for img in *.jpg do filename=$(basename "$img") extension="${filename##*.}" filename="${filename%.*}" echo $filename convert "$img" "$filename.png" done
REMOVING NEWLINES (and replacing with spaces)
tr '\n' ' ' < inputFile
REMOVING // comments from a c program (to standard output)
sed 's://.*$::g' file.c