#!/bin/bash
num=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | grep -oE '[0-9]+'|sort -rn|head -n 1)
key=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
newnum=$(grep -oE '[0-9]+' $key |sort -rn|head -n 1)
echo $newnum
grep
接受$key
as 文件名,但我希望它搜索存储在变量 中的文本$text
。