小编Rwd*_*dxr的帖子

替换字符串后的字符

S-123-P Bash Pocket Ref.        2010    Cengage Learning    $55
E-P234  Python Pocket Ref.      2012    Cengage Learning    $45
55-MNP  Unix System Programming 2001    Sybex               $230
Run Code Online (Sandbox Code Playgroud)

我需要在$不包括$with之后替换数字*,所以输出需要是:

S-123-P Bash Pocket Ref.        2010    Cengage Learning    $**
E-P234  Python Pocket Ref.      2012    Cengage Learning    $**
55-MNP  Unix System Programming 2001    Sybex               $***
Run Code Online (Sandbox Code Playgroud)

我已经能够替换最后一位或最后 2 位,但不是$. 我试过sedawkgsub 但我尝试的任何东西似乎都不起作用。

sed awk text-processing

2
推荐指数
1
解决办法
236
查看次数

标签 统计

awk ×1

sed ×1

text-processing ×1