<div dir="ltr">Hum... good idea but I can&#39;t make it work the way I want. In fact, each time I do a &quot;echo text &gt; file.txt&quot;, the file.txt is created in the directory below, not the current one. As I can&#39;t create a file in another directory. <div>
<br></div><div>I&#39;m creating a JIRA (either to fix something that is not working, or to document it)</div><div><br></div><div><a href="https://issues.jboss.org/browse/FORGE-1860">https://issues.jboss.org/browse/FORGE-1860</a><br>
</div><div><br></div><div>Antonio</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-30 17:15 GMT+02:00 George Gastaldi <span dir="ltr">&lt;<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>I think piping to a file would be more intuitive and it should work now:</div><div><br></div><div>
Eg:</div><div>echo Hi &gt; a.txt</div><div><br></div><div>cat file.txt&gt;anotherfile.txt</div><div><br>Em 30/05/2014, às 11:36, Antonio Goncalves &lt;<a href="mailto:antonio.mailing@gmail.com" target="_blank">antonio.mailing@gmail.com</a>&gt; escreveu:<br>
<br></div><div><div class="h5"><blockquote type="cite"><div><div dir="ltr">No feedback on this feature ? I feel it could fill many of my gaps. Nobody else sees any need ?</div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-05-25 18:02 GMT+02:00 Antonio Goncalves <span dir="ltr">&lt;<a href="mailto:antonio.mailing@gmail.com" target="_blank">antonio.mailing@gmail.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi all,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I see myself adding files here and there on my projects (JBoss cli commands, shell scripts, SQL scripts...) and I use the touch command in Forge extensively. But how could I add content to these files ? I mostly write Forge scripts, so I would love to do something like that in my script :</div>


<div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"># Creates a project</div><div class="gmail_extra">







<p>project-new --named test</p><p># Adds a few extra files and directories<br></p><p>
mkdir src/main/script ;<br>
touch src/main/resources/insert.sql ; <i><b>// This creates an empty file</b></i><br>
</p><p><b><font color="#ff0000">touch</font></b> src/main/script/wildfly-show.cli <b><font color="#ff0000">--content (((( </font></b><i><b>// This adds content to the file</b></i></p></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">


<div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">version</font></p></div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif"># ####################</font></p></div>
<div class="gmail_extra"><p><font face="arial, helvetica, sans-serif"># #  System Properties</font></p></div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif"># ####################</font></p>
</div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">/core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)</font></p></div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif"># ####################</font></p>


</div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif"># #  Datasource</font></p></div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif"># ####################</font></p>
</div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">/subsystem=datasources/data-source=ApplicationBlancheH2DS:read-resource</font></p></div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">/subsystem=datasources/data-source=ApplicationBlancheH2DS:test-connection-in-pool</font></p>


</div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">/subsystem=datasources/data-source=ApplicationBlancheOracleDS:read-resource</font></p></div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">/subsystem=datasources/data-source=ApplicationBlancheOracleDS:test-connection-in-pool</font></p>


</div><div class="gmail_extra"><p><font face="arial, helvetica, sans-serif">/subsystem=datasources/jdbc-driver=oracle:read-resource</font></p></div></blockquote><div class="gmail_extra"><div><b><font color="#ff0000">))))</font></b></div>


<p><br></p><div>And this command would just create a file with the previous content in it. As you can see, this can be tricky : when to end the content of a file (something similar to &lt;![CDATA[]]&gt;)</div><div>
<br></div><div>What do you think ? Any idea to integrate this feature smoothly in Forge ?</div><span><font color="#888888"><div><br></div><div><br></div>-- <br>Antonio Goncalves <br>Software architect and Java Champion<br>

<br><a href="http://www.antoniogoncalves.org/" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://www.parisjug.org/" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr/" target="_blank">Devoxx France</a>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Antonio Goncalves <br>Software architect and Java Champion<br><br><a href="http://www.antoniogoncalves.org/" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://www.parisjug.org/" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr/" target="_blank">Devoxx France</a>
</div>
</div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><br><span>forge-users mailing list</span><br><span><a href="mailto:forge-users@lists.jboss.org" target="_blank">forge-users@lists.jboss.org</a></span><br>
<span><a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a></span></div></blockquote></div><br>_______________________________________________<br>

forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Antonio Goncalves <br>
Software architect and Java Champion<br><br><a href="http://www.antoniogoncalves.org/" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://www.parisjug.org/" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr/" target="_blank">Devoxx France</a>
</div>