This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env luajit | |
-- Handle command-line arguments | |
local args = {...} | |
for i, v in ipairs(args) do | |
-- print("Argument " .. i .. ": " .. v) | |
end | |
-- Handle piped input | |
--local piped_input = io.stdin:read("*a") | |
--if piped_input and piped_input ~= "" then | |
-- print("Received piped input:", piped_input) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find . -depth -name '* *' | while read fname; do | |
new_fname=$(echo $fname | tr " " "_") | |
if [ -e $new_fname ]; then | |
echo "File $new_fname already exists. Not replacing $fname" | |
else | |
echo "Creating new file $new_fname to replace $fname" | |
mv "$fname" $new_fname | |
fi |