Linux
  • Linux
  • Bash
  • Debian
  • Ubuntu
  • Shell
  • CentOS
  • SSH
☰

使用sed編輯程式碼

tag-icon 2024-5-12 • tag-icon sed
使用sed編輯程式碼

如何編寫sed執行以下操作的腳本:

old(a,b)

文件中應替換為

new(b, 0, a)

a,b可以是任何包含字母、空格、數字和以下符號的字串:. / * - +

答案1

嘗試:

sed 's/old(\([-a-zA-Z 0-9./*+]*\),\([-a-zA-Z 0-9./*+]*\))/new(\2, 0, \1)/'
THE END
運行javascript後如何取得網頁內容? 運行javascript後如何取得網頁內容?
防止 USB 硬碟機外殼在不活動後關閉 防止 USB 硬碟機外殼在不活動後關閉

相關內容

熱門問答

熱門問答

  • curl
  • http
  • javascript
  • ubuntu
  • linux-mint
  • power-management
  • external-hdd

© 2024 rvso.com 版權所有. 網站地圖