一个文件内容如下:
61a:23:off:/etc/getty tty61a m
61b:23:off:/etc/getty tty61b m
61c:23:off:/etc/getty tty61c m
61d:23:off:/etc/getty tty61d m
61e:23:off:/etc/getty tty61e m
61f:23:off:/etc/getty tty61f m
61g:23:off:/etc/getty tty61g m
61h:23:off:/etc/getty tty61h m
请问下如何用shell将tty61a改为tty100,
tty61b改为tty101,
tty61c改为tty102,
。。。。。。。。。。
tty61h改为tty108.
方法1:
awk 'BEGIN { i = 100 } = "tty"i++ ' filename