Hum... good idea but I can't make it work the way I want. In fact, each
time I do a "echo text > file.txt", the file.txt is created in the
directory below, not the current one. As I can't create a file in another
directory.
I'm creating a JIRA (either to fix something that is not working, or to
document it)
https://issues.jboss.org/browse/FORGE-1860
Antonio
2014-05-30 17:15 GMT+02:00 George Gastaldi <ggastald(a)redhat.com>:
I think piping to a file would be more intuitive and it should work
now:
Eg:
echo Hi > a.txt
cat file.txt>anotherfile.txt
Em 30/05/2014, às 11:36, Antonio Goncalves <antonio.mailing(a)gmail.com>
escreveu:
No feedback on this feature ? I feel it could fill many of my gaps. Nobody
else sees any need ?
2014-05-25 18:02 GMT+02:00 Antonio Goncalves <antonio.mailing(a)gmail.com>:
> Hi all,
>
> 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
> :
>
>
> # Creates a project
>
> project-new --named test
>
> # Adds a few extra files and directories
>
> mkdir src/main/script ;
> touch src/main/resources/insert.sql ; *// This creates an empty file*
>
> *touch* src/main/script/wildfly-show.cli *--content (((( **// This adds
> content to the file*
>
> version
>
> # ####################
>
> # # System Properties
>
> # ####################
>
>
> /core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
>
> # ####################
>
> # # Datasource
>
> # ####################
>
> /subsystem=datasources/data-source=ApplicationBlancheH2DS:read-resource
>
>
> /subsystem=datasources/data-source=ApplicationBlancheH2DS:test-connection-in-pool
>
>
> /subsystem=datasources/data-source=ApplicationBlancheOracleDS:read-resource
>
>
>
/subsystem=datasources/data-source=ApplicationBlancheOracleDS:test-connection-in-pool
>
> /subsystem=datasources/jdbc-driver=oracle:read-resource
>
> *))))*
>
>
> 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 <![CDATA[]]>)
>
> What do you think ? Any idea to integrate this feature smoothly in Forge ?
>
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <
http://www.antoniogoncalves.org/> | Twitter
> <
http://twitter.com/agoncal> | LinkedIn
> <
http://www.linkedin.com/in/agoncal> | Paris JUG
> <
http://www.parisjug.org/> | Devoxx France <
http://www.devoxx.fr/>
>
--
Antonio Goncalves
Software architect and Java Champion
Web site <
http://www.antoniogoncalves.org/> | Twitter
<
http://twitter.com/agoncal> | LinkedIn
<
http://www.linkedin.com/in/agoncal> | Paris JUG
<
http://www.parisjug.org/> | Devoxx France <
http://www.devoxx.fr/>
_______________________________________________
forge-users mailing list
forge-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users
_______________________________________________
forge-users mailing list
forge-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users
--
Antonio Goncalves
Software architect and Java Champion
Web site <
http://www.antoniogoncalves.org/> | Twitter
<
http://twitter.com/agoncal> | LinkedIn <
http://www.linkedin.com/in/agoncal>
| Paris JUG <
http://www.parisjug.org/> | Devoxx France
<
http://www.devoxx.fr/>