All pastes #292993 Raw Edit

Anonymous

public text v1 · immutable
#292993 ·published 2006-12-27 02:30 UTC
rendered paste body
#!/bin/bash
for i in $(ls); do
        zip -j $i.zip $i
done

The above is supposed to be a script for zipping all files in a directory into separate archives, each
named the same thing as the file. This only works for names with no spaces, though; how do I fix this
so that it handles filenames with spaces in them?