2021年1月18日星期一

Bash Script - Replace Last Comma In Folder Names with an & [duplicate]

I need help writing a Bash script. I want it to go through a folder and rename all sub-folders to replace the LAST comma with an ampersand.

for dir in /home/john/Documents/TEST/*;   do       # ***This is the part I can't figure out***  done  

Say the folder is '1234 John, James, Jack' - I want it to become '1234 John, James & Jack'

https://stackoverflow.com/questions/65784236/bash-script-replace-last-comma-in-folder-names-with-an January 19, 2021 at 09:14AM

没有评论:

发表评论