| www.delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Date: | Sat, 16 Sep 2006 22:34:56 +1000 |
| From: | oleyk <oleyk AT mail DOT ru> |
| X-Mailer: | The Bat! (v1.62r) |
| Reply-To: | oleyk <oleyk AT mail DOT ru> |
| Message-ID: | <1472821029.20060916223456@mail.ru> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re[2]: add folder name to filename |
| In-Reply-To: | <45095465.9010507@cc.uoi.gr> |
| References: | <450949CF DOT 5050306 AT cc DOT uoi DOT gr> <45094B84 DOT 6010009 AT byu DOT net> <45094C90 DOT 3010804 AT cc DOT uoi DOT gr> <45094E89 DOT 8040000 AT byu DOT net> <45095465 DOT 9010507 AT cc DOT uoi DOT gr> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
hi Nikolaos
NAP> Fixed :
NAP> added a space after "folder":
NAP> for file in folder */*; do
^^^^^^
NAP> echo folder */*
NAP> dir=$(basename "$(dirname "$file")")
NAP> base=$(basename "$file")
NAP> mv "$file" "$(dirname "$file")/${dir}_${base}"
NAP> done
"Script started, file is typescript" -- "file" - reserved word
hint: man file
--
Regards,
oleyk mailto:oleyk AT mail DOT ru
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |