Blob
1 #!/bin/bash3 if [ -e ~/.bashrc ] ; then4 . ~/.bashrc5 fi6 PLAN9=${PLAN9:-/usr/local/plan9}8 bin=$PLAN9/bin9 IFS=$'\n'11 for file in $($bin/macargv)12 do13 # Blanks are problematic in filenames: just plumb14 # the file's content.15 if echo "$file" | grep -q " "16 then17 base=$(basename "$file" | sed 's/ /_/g')18 attr="action=showdata filename=/BadName/$base"19 cat $file | "$bin/plumb" -i -d edit -a "$attr"20 else21 "$bin/plumb" -d edit "$file"22 fi23 done