Imported from ../bash-2.04.tar.gz.

This commit is contained in:
Jari Aalto committed 2009-09-12 16:46:53 +00:00
1 parent b72432fdcc
commit bb70624e96
387 files changed
+28522 -9334

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#! /bin/bash
#
# center - center a group of lines
#
# tabs in the lines might cause this to look a little bit off
#
#
width=${COLUMNS:-80}
if [[ $# == 0 ]]
then
set -- /dev/stdin
fi
for file
do
while read -r
do
printf "%*s\n" $(( (width+${#REPLY})/2 )) "$REPLY"
done < $file
done
exit 0