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.
Hi erstmal, ich suche nach einer Möglichkeit wie ich einem Shell script sagen kann er soll in einem Ordner mehrere Archive entpacken.
Ist dies möglich denn ich kann dem Script keine festen Namen der Archive geben, weil dort Versionsnummern mit hinterlegt sind.
Hi erstmal, ich suche nach einer Möglichkeit wie ich einem Shell script sagen kann er soll in einem Ordner mehrere Archive entpacken.
Ist dies möglich denn ich kann dem Script keine festen Namen der Archive geben, weil dort Versionsnummern mit hinterlegt sind.
Please read the LQ Rules: this is an English only forum, so please repost your question in English.
hallo tealk144, wenn deine englischkenntnisse nicht so gut sind kannst du mir eine private message senden, wir versuchen dass dann abzuklären. hört sich nicht so kompliziert an. haben alle archive die gleiche dateiendung? pack mal eine dateiliste mit ein.
gruss, o.
translation:
hallo tealk144 if yours are not so good english you can send me private message, we try to clarify that then. does not sound so elaborately. do everything have archive same ending? pack sometimes file list with.
in other words, we will either continue this in english or op can pm me.
Hmm ok, yes i have some problems to explain something in English^^
i cant give you a List with the Files, but all Files are .zip like "worldedit-5.6.2.zip"
for f in *.zip ; do unzip -d $f.unzipped $f ; done
you can paste that straight into your terminal (change to the folder with the zip files first).
or, as a script:
Code:
#!/bin/sh
for f in *.zip
do
unzip -d $f.unzipped $f
done
you can save that to a file, then make that file executable, then execute it.
it might be good to put the file in $HOME/bin and make sure that $HOME/bin is in your $PATH.
you could then point your file browser to some custom "Open with..." command for zip-files.
i don't understand.
you yourself said that they are zip files, all in one folder.
if you run the script on a folder without zipfiles, it simply does not do anything.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.