Permalink
Browse files

Allow leading - in filenames

  • Loading branch information...
1 parent ba75e99 commit 65bed5e50108301fa3885e24ef8d66227d82a6f2 @chneukirchen committed Mar 6, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 nb
View
6 nb
@@ -8,12 +8,12 @@ cd ~/NB
FILES=$(ls -1t | grep -v '~$')
for rx in "$@"; do
- FILES=$(echo "$FILES" | xargs grep -la "$rx")
+ FILES=$(echo "$FILES" | xargs grep -la -e "$rx")
done
for f in $FILES; do
- export HEAD=$(tail -n+2 $f | head -c80 | tr -s '\n\t' ' ')
- stat -c "%n %y" $f | awk '{printf("%-69s %s\n",
+ export HEAD=$(tail -n+2 ./"$f" | head -c80 | tr -s '\n\t' ' ')
+ stat -c "%n %y" -- "$f" | awk '{printf("%-69s %s\n",
substr($1 " " ENVIRON["HEAD"], 0, 69), $2) }'
done

0 comments on commit 65bed5e

Please sign in to comment.