ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
for file in *{1458..1500}_*;
do
mv "$file" /ora/archives
done
This does not work because you put an extra underscore that does not appears in the file name (not in that position). The ghostdog's solution is more straightforward, anyway.
Silently editing your original post to change the filenames you listed is a little on the disingenuous side. You've effectively made everyones responses to you look wrong, when based on the information you originally provided, they weren't. Making people who take the time to try and help you look stupid is bad form.
Are you using bash? And is brace expansion enabled as well as pathname expansion?
@konsolebox, you hit the nail on the head.
@scofiled83, what is the output of
Code:
echo $-
this will tell you which options are set in the current shell. Also the "extended brace expansion" is a feature introduced in bash version 3. It does not work in older versions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.