From fef927a8550a2d0ff149e25eacde34c283819306 Mon Sep 17 00:00:00 2001 From: Robin Clark Date: Sun, 24 Mar 2019 11:22:36 +0000 Subject: [PATCH] bash one liner to take spaces out of file names in the current directory, i.e. mass rename --- bash.bashrc | 1 + 1 file changed, 1 insertion(+) diff --git a/bash.bashrc b/bash.bashrc index cd1c4dd..befd258 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -95,6 +95,7 @@ alias la='ls -A' alias l='ls -CF' alias cb='indent -kr -l200 -lc200 -cli2 -i4 -nut -linux $1' alias en='enscript -2 -r %E $1' +alias remove_spaces_from_file_names='for f in *\ *; do mv "$f" "${f// /_}"; done' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert