diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-discuss/2013-January/009037.html | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-discuss/2013-January/009037.html')
-rw-r--r-- | zarb-ml/mageia-discuss/2013-January/009037.html | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/zarb-ml/mageia-discuss/2013-January/009037.html b/zarb-ml/mageia-discuss/2013-January/009037.html new file mode 100644 index 000000000..c6cd9f8c1 --- /dev/null +++ b/zarb-ml/mageia-discuss/2013-January/009037.html @@ -0,0 +1,98 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-discuss] Debian-style «rename» utility? + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%0A%20%3D%3Fiso-8859-15%3Fq%3FDebian-style_%3DABrename%3DBB_utilit%3F%3D%0A%20%3D%3Fiso-8859-15%3Fq%3Fy%3D3F%3F%3D&In-Reply-To=%3C201301020724.22251.renaud%40olgiati-in-paraguay.org%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="009036.html"> + <LINK REL="Next" HREF="009038.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-discuss] Debian-style «rename» utility?</H1> + <B>Renaud (Ron) Olgiati</B> + <A HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%0A%20%3D%3Fiso-8859-15%3Fq%3FDebian-style_%3DABrename%3DBB_utilit%3F%3D%0A%20%3D%3Fiso-8859-15%3Fq%3Fy%3D3F%3F%3D&In-Reply-To=%3C201301020724.22251.renaud%40olgiati-in-paraguay.org%3E" + TITLE="[Mageia-discuss] Debian-style «rename» utility?">renaud at olgiati-in-paraguay.org + </A><BR> + <I>Wed Jan 2 11:24:22 CET 2013</I> + <P><UL> + <LI>Previous message: <A HREF="009036.html">[Mageia-discuss] Debian-style «rename» utility? +</A></li> + <LI>Next message: <A HREF="009038.html">[Mageia-discuss] Software RAID +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#9037">[ date ]</a> + <a href="thread.html#9037">[ thread ]</a> + <a href="subject.html#9037">[ subject ]</a> + <a href="author.html#9037">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>On Tuesday 01 Jan 2013 21:13 my mailbox was graced by a message from Renaud +(Ron) Olgiati who wrote: +><i> I have been removing spaces and a number of characters that cause problems +</I>><i> in filenames with the following: +</I>><i> +</I>><i> #!/bin/bash +</I>><i> ls | grep " " >totototo +</I>><i> while [ -s totototo ] +</I>><i> do +</I>><i> rename " " _ *" "* +</I>><i> ls | grep " " >totototo +</I>><i> done +</I>><i> for CHR in "(" ")" "," "%" "'" ":" ";" "__" "_-" +</I>><i> do +</I>><i> ls | grep $CHR >totototo +</I>><i> while [ -s totototo ] +</I>><i> do +</I>><i> rename $CHR "" *$CHR* +</I>><i> ls | grep $CHR >totototo +</I>><i> done +</I>><i> rm -f totototo +</I>><i> done +</I>><i> echo "Finished !" +</I>><i> +</I>><i> Forgot why the space character is treated apart from the others, but ISTR +</I>><i> that the for would not work if $CHR was a space. +</I> +It came back ! It is because the spaces are replaced by an _ while the +characters, or groups of characters, in the "for CHR in..." line are simply +removed. + +Cheers, + +Ron. +-- + Les vieux donnent de bons conseils pour se consoler + de ne plus pouvoir donner le mauvais exemple. + -- La Rochefoucauld + + -- <A HREF="http://www.olgiati-in-paraguay.org">http://www.olgiati-in-paraguay.org</A> -- + + +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="009036.html">[Mageia-discuss] Debian-style «rename» utility? +</A></li> + <LI>Next message: <A HREF="009038.html">[Mageia-discuss] Software RAID +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#9037">[ date ]</a> + <a href="thread.html#9037">[ thread ]</a> + <a href="subject.html#9037">[ subject ]</a> + <a href="author.html#9037">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-discuss">More information about the Mageia-discuss +mailing list</a><br> +</body></html> |