Skip to content

Instantly share code, notes, and snippets.

@netrunn3r
netrunn3r / linux.md
Last active February 22, 2018 20:54

Simple things

Output to console string which goes to bc, and result from bc
echo "2+3" | tee /dev/tty | bc

Remove country specific characters and [^a-zA-Z0-9._] in filename for FILE in *.doc ; do mv "$FILE" "$( echo $FILE | iconv -f UTF-8 -t US-ASCII//TRANSLIT - | sed -r 's/[^a-z0-9._]+/_/ig' )" ; done

Split file to 'n' lines:
split -l <lines> <input> <prefix>