我正处于玩最终幻想7的中间,我正处于你在Shinra HQ图书馆的那一部分,你必须写下N字母 – 减去空格,其中Nth是数字书的标题前面 – 对于每本似乎不属于当前房间的书,其中有4本.
我需要一个sed脚本或其他命令行来打印书的标题,并在其名称中输入第N个字母.
你不需要sed.您可以使用bash字符串替换:$book="The Ancients in History" $book="${book// /}" # Do global substition to remove spaces $echo "${book:13:1}" # Start at position 13 indexed at 0 and print 1 character H
精彩评论