【发布时间】:2016-09-25 06:21:05
【问题描述】:
我需要在 bash shell 中以相反的顺序打印一个字符串。
[deeps@host1:~]echo maps.google.com|rev
moc.elgoog.spam
[deeps@host1:~]
但我需要它作为“com.google.maps”。对于以句点分隔的任何字符串(.),我通常需要它。
它应该以相反的顺序打印。我该怎么做?
我也需要 Perl 中的解决方案。
【问题讨论】:
标签: linux string bash perl shell