Rename multiple files if they endswith âmdâ to âshâ
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Given that I intent to change files with extensive name of .md to .sh
$ ls
bath.md breakfast.md brush.md test.sh
I wrote it as
$ cat test.sh
! /usr/local/bin/bash
for f in *
do
if $f endswith .md
replace $f.md with $f.sh
done
How could I get the script done?
bash shell-script
New contributor
add a comment |Â
up vote
0
down vote
favorite
Given that I intent to change files with extensive name of .md to .sh
$ ls
bath.md breakfast.md brush.md test.sh
I wrote it as
$ cat test.sh
! /usr/local/bin/bash
for f in *
do
if $f endswith .md
replace $f.md with $f.sh
done
How could I get the script done?
bash shell-script
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Given that I intent to change files with extensive name of .md to .sh
$ ls
bath.md breakfast.md brush.md test.sh
I wrote it as
$ cat test.sh
! /usr/local/bin/bash
for f in *
do
if $f endswith .md
replace $f.md with $f.sh
done
How could I get the script done?
bash shell-script
New contributor
Given that I intent to change files with extensive name of .md to .sh
$ ls
bath.md breakfast.md brush.md test.sh
I wrote it as
$ cat test.sh
! /usr/local/bin/bash
for f in *
do
if $f endswith .md
replace $f.md with $f.sh
done
How could I get the script done?
bash shell-script
bash shell-script
New contributor
New contributor
New contributor
asked 1 min ago
avirate
34629
34629
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
avirate is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
avirate is a new contributor. Be nice, and check out our Code of Conduct.
avirate is a new contributor. Be nice, and check out our Code of Conduct.
avirate is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478205%2frename-multiple-files-if-they-endswith-md-to-sh%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password