<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=362723&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [resolu] combiner 2 actions bash type ${i#*.}]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=362723</link>
		<description><![CDATA[Les sujets les plus récents dans [resolu] combiner 2 actions bash type ${i#*.}.]]></description>
		<lastBuildDate>Tue, 01 Dec 2009 15:43:54 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3109591#p3109591</link>
			<description><![CDATA[<p>ok merci pour l&#039;info <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>&quot;resolu&quot;</p>]]></description>
			<author><![CDATA[dummy@example.com (Hizoka)]]></author>
			<pubDate>Tue, 01 Dec 2009 15:43:54 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3109591#p3109591</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3109554#p3109554</link>
			<description><![CDATA[<p>et non ...:(<br />mais tu peux faire une fonction que tu places dans ton bashrc (ou .profile) et que tu exportes <img src="http://forum.ubuntu-fr.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><div class="codebox"><pre><code>#!/bin/bash

expand()
{
 [ $# -lt 2 ] &amp;&amp; { echo &quot;Nombre de parametre invalide.&quot;; return 1; } &gt;&amp;2

 nomVariable=&quot;$1&quot;
 variable=&quot;${!nomVariable}&quot;
 shift
 
 for param
 do
    variable=&quot;$(eval &quot;echo \&quot;\${variable${param}}\&quot;&quot;)&quot;
    [ $? -ne 0 ] &amp;&amp; { echo &quot;${!nomVariable}&quot;; return; }
 done
 echo &quot;${variable}&quot;
}

export -f expand

toto=&quot;a/b/c.d&quot;
expand toto &quot;##*/&quot; &quot;%.*&quot;
test=&quot;j.e.s.u.i.s.u.n.e.v.a.r.i.a.b.l.e&quot;
test=&quot;$(expand test &quot;#*.&quot; &quot;#*.&quot; &quot;#*.&quot;)&quot;
echo &quot;test=${test}&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Totor)]]></author>
			<pubDate>Tue, 01 Dec 2009 15:20:23 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3109554#p3109554</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108689#p3108689</link>
			<description><![CDATA[<p>oui ça marche ça on est ok, mais existe-t-il un moyen de combiner les 2 en une commande ?<br />genre :${test#*. | %.*}</p>]]></description>
			<author><![CDATA[dummy@example.com (Hizoka)]]></author>
			<pubDate>Tue, 01 Dec 2009 02:01:08 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108689#p3108689</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108688#p3108688</link>
			<description><![CDATA[<p>Bon, c&#039;est peut etre l&#039;heure tardive qui fait ça, mais je comprends pas, tes exemples sont ok !</p><div class="codebox"><pre><code>$ echo ${test#*.}
e.s.u.i.s.u.n.e.v.a.r.i.a.b.l.e
$ echo ${test%.*}
j.e.s.u.i.s.u.n.e.v.a.r.i.a.b.l</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (AnsuzPeorth)]]></author>
			<pubDate>Tue, 01 Dec 2009 01:58:11 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108688#p3108688</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108687#p3108687</link>
			<description><![CDATA[<p>bah, la il faut lui dire, de virer avant le 1er &quot;.&quot; et apres le dernier &quot;.&quot;</p><p>/me à toujours un peu de mal...</p>]]></description>
			<author><![CDATA[dummy@example.com (Hizoka)]]></author>
			<pubDate>Tue, 01 Dec 2009 01:53:47 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108687#p3108687</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108686#p3108686</link>
			<description><![CDATA[<p>???<br />Ben koi <br />???</p><p>Le même principe non ?</p>]]></description>
			<author><![CDATA[dummy@example.com (AnsuzPeorth)]]></author>
			<pubDate>Tue, 01 Dec 2009 01:42:50 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108686#p3108686</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108681#p3108681</link>
			<description><![CDATA[<p>ouais ok mais avec un autre exemple (il était pourri celui la) :</p><div class="codebox"><pre><code>test=&quot;j.e.s.u.i.s.u.n.e.v.a.r.i.a.b.l.e&quot;
test=${test#*.}
test=${test%.*}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Hizoka)]]></author>
			<pubDate>Tue, 01 Dec 2009 01:31:53 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108681#p3108681</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108680#p3108680</link>
			<description><![CDATA[<div class="codebox"><pre><code>${test#*.*.*.}</code></pre></div><p>Non ?<br />(peut etre devoir protéger le point ? Je sais jamais entre le bash et le regex )</p>]]></description>
			<author><![CDATA[dummy@example.com (AnsuzPeorth)]]></author>
			<pubDate>Tue, 01 Dec 2009 01:30:29 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108680#p3108680</guid>
		</item>
		<item>
			<title><![CDATA[[resolu] combiner 2 actions bash type ${i#*.}]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108578#p3108578</link>
			<description><![CDATA[<p>Bonsoir !</p><p>Je voulais savoir un petit truc en fait :</p><p>soit la variable test :</p><div class="codebox"><pre><code>test=&quot;j.e.s.u.i.s.u.n.e.v.a.r.i.a.b.l.e&quot;</code></pre></div><p>disons que je veux supprimer tout ce qui se trouve avant le 3éme point, je fais :</p><div class="codebox"><pre><code>test=${test#*.}
test=${test#*.}
test=${test#*.}</code></pre></div><p>est-il possible de combiner les 3 actions en une seule ?</p><p>alors il existe cut mais bon... c&#039;est juste une question comme ça <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>bonne nuit les n&#039;enfants <img src="http://forum.ubuntu-fr.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Hizoka)]]></author>
			<pubDate>Mon, 30 Nov 2009 23:46:21 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3108578#p3108578</guid>
		</item>
	</channel>
</rss>
