rupeshforu3
Disciple
Hi I am Rupesh from India and I have Fedora 36 Linux and some files which consists of files with names consisting of square brackets and some text in between. I want to remove these square brackets including text.
Recently I have downloaded youtube videos using yt-dlp which is youtube downloader in Linux and succeeded but its file name has the following form.
This is youtube video [abcdefg-].mp4
Here in the above file name "This is youtube video" is the title of YouTube video and abcdefg- is the id for that youtube video. mp4 is the video file extension.
Now I want to remove characters between square brackets including square brackets ie., [abcdefg-]. Here before square brackets space character is present and I want to remove it also.
Finally I want file with name as "This is youtube video.mp4".
I have 100s of files as above.
I have searched web and found some sed commands but failed.Please try to suggest how to remove characters between brackets including square brackets from file name.
Regards,
Rupesh.
Recently I have downloaded youtube videos using yt-dlp which is youtube downloader in Linux and succeeded but its file name has the following form.
This is youtube video [abcdefg-].mp4
Here in the above file name "This is youtube video" is the title of YouTube video and abcdefg- is the id for that youtube video. mp4 is the video file extension.
Now I want to remove characters between square brackets including square brackets ie., [abcdefg-]. Here before square brackets space character is present and I want to remove it also.
Finally I want file with name as "This is youtube video.mp4".
I have 100s of files as above.
I have searched web and found some sed commands but failed.Please try to suggest how to remove characters between brackets including square brackets from file name.
Regards,
Rupesh.