Skip to content

Instantly share code, notes, and snippets.

@foowaa
Created September 18, 2019 06:01
Show Gist options
  • Save foowaa/dc7bac069d232c621d6bac9b307aa4d8 to your computer and use it in GitHub Desktop.
Save foowaa/dc7bac069d232c621d6bac9b307aa4d8 to your computer and use it in GitHub Desktop.
#!/bin/bash
## get files in current dir
path=$(dirname·$0)
files=$(ls·$path)
for·filename·in·$files
do
echo $filename >> abc
done
## remove
cat abc | while read line
do
rm ${line}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment