UNIX下SH的实现源码

源代码在线查看: center

软件大小: 2100 K
上传用户: RR15133422795
关键词: UNIX 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				#! /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							

相关资源