mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
d52bdd3356
Change-Id: I7585870aee57c7482ebdd19c117be7982123ce79 Reviewed-on: https://plan9port-review.googlesource.com/1130 Reviewed-by: Russ Cox <rsc@google.com>
17 lines
354 B
Bash
Executable file
17 lines
354 B
Bash
Executable file
#!/bin/bash
|
|
|
|
PLAN9=${PLAN9:-/usr/local/plan9}
|
|
bin=$PLAN9/bin
|
|
|
|
file=$1
|
|
|
|
# Blanks are problematic in filenames: just plumb
|
|
# the file's content.
|
|
if echo "$file" | grep -q " "
|
|
then
|
|
base=$(basename "$file" | sed 's/ /_/g')
|
|
attr="action=showdata filename=/BadName/$base"
|
|
cat $file | "$bin/plumb" -i -d edit -a "$attr"
|
|
else
|
|
"$bin/plumb" -d edit "$file"
|
|
fi
|