2009-12-23から1日間の記事一覧
#!/bin/sh #toolong.sh width=72 if [ ! -r "$1" ]; then echo "Usage: $0 filename" >&2 exit 1 fi while read input ; do if [ ${#input} -gt $width ]; then echo "$input" | fmt else echo "$input" fi done < $1 exit 0 $ ./toolong.sh ragged.txt So s…