Removing digits from beginning of file
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I was hoping this would work:
$ find . -type f -exec basename ; | while EFS= read -r f; do echo "$f##[0-9]"; done
But, for example, for files named as:
1foo
11bar
it returns:
foo
1bar
when
foo
bar
is expected.
PS: ultimately, I want to mv "$f"
to the modified name (and also do other modifications)
find parameter
add a comment |Â
up vote
0
down vote
favorite
I was hoping this would work:
$ find . -type f -exec basename ; | while EFS= read -r f; do echo "$f##[0-9]"; done
But, for example, for files named as:
1foo
11bar
it returns:
foo
1bar
when
foo
bar
is expected.
PS: ultimately, I want to mv "$f"
to the modified name (and also do other modifications)
find parameter
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was hoping this would work:
$ find . -type f -exec basename ; | while EFS= read -r f; do echo "$f##[0-9]"; done
But, for example, for files named as:
1foo
11bar
it returns:
foo
1bar
when
foo
bar
is expected.
PS: ultimately, I want to mv "$f"
to the modified name (and also do other modifications)
find parameter
I was hoping this would work:
$ find . -type f -exec basename ; | while EFS= read -r f; do echo "$f##[0-9]"; done
But, for example, for files named as:
1foo
11bar
it returns:
foo
1bar
when
foo
bar
is expected.
PS: ultimately, I want to mv "$f"
to the modified name (and also do other modifications)
find parameter
find parameter
asked 15 mins ago
Erwann
268
268
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f477613%2fremoving-digits-from-beginning-of-file%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