小编bin*_*281的帖子

BASH:从标准输出,内联获取输出的最后4个字符

我有一个正在运行和使用的脚本

lspci -s 0a.00.1 
Run Code Online (Sandbox Code Playgroud)

这回来了

0a.00.1 usb controller some text device 4dc9
Run Code Online (Sandbox Code Playgroud)

我希望得到最后4个字符内联

lspci -s 0a.00.1 | some command to give me the last 4 characters. 
Run Code Online (Sandbox Code Playgroud)

linux bash shell character

31
推荐指数
4
解决办法
6万
查看次数

标签 统计

bash ×1

character ×1

linux ×1

shell ×1