FG
💻 Software

How to append a string to a file name in Bash Shell?

Fresh6 days ago
Mar 15, 202632662 views
Confidence Score0%
0%

Problem

So I am supposed to find all the files in the given directory with surffix of .C or cc, and change their name to .C.blah or .cc.blah Is there a command to do that? Or should I implement this with the command find?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to append a string to a file name in Bash Shell?

Low Risk

There are a few approaches, depending on what is available on your *nix. There two different commands around, one provided through perl, and one as part of standard utils. Perl version: utils version - you might be able to do this with one line: for…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment