Blob


1 #!/bin/bash
3 if [ -e ~/.bashrc ] ; then
4 . ~/.bashrc
5 fi
6 PLAN9=${PLAN9:-/usr/local/plan9}
8 bin=$PLAN9/bin
9 IFS=$'\n'
11 for file in $($bin/macargv)
12 do
13 # Blanks are problematic in filenames: just plumb
14 # the file's content.
15 if echo "$file" | grep -q " "
16 then
17 base=$(basename "$file" | sed 's/ /_/g')
18 attr="action=showdata filename=/BadName/$base"
19 cat $file | "$bin/plumb" -i -d edit -a "$attr"
20 else
21 "$bin/plumb" -d edit "$file"
22 fi
23 done