How do I pipe the output of a command/operation to a file?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I pipe the output of a command/operation to a file?

Vimal Kansal
Hi,

I am using jboss-admin cli tool.  I am not sure as to how do I pipe the
output of any command/operation to a file?

Thx

Vimal

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: How do I pipe the output of a command/operation to a file?

Alexey Loubyansky
This works

./jboss-admin.sh -c --command=:read-resource > cli.log

Alexey

On 07/14/2011 03:46 AM, Vimal Kansal wrote:

> Hi,
>
> I am using jboss-admin cli tool.  I am not sure as to how do I pipe the
> output of any command/operation to a file?
>
> Thx
>
> Vimal
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: How do I pipe the output of a command/operation to a file?

Alexey Loubyansky
Although, as Emanuel suggested once, making '--command=' optional would
simplify the syntax, e.g.

./jboss-admin.sh -c :read-resource > cli.log

I think I'll do it.

On 07/15/2011 08:50 AM, Alexey Loubyansky wrote:

> This works
>
> ./jboss-admin.sh -c --command=:read-resource>  cli.log
>
> Alexey
>
> On 07/14/2011 03:46 AM, Vimal Kansal wrote:
>> Hi,
>>
>> I am using jboss-admin cli tool.  I am not sure as to how do I pipe the
>> output of any command/operation to a file?
>>
>> Thx
>>
>> Vimal
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: How do I pipe the output of a command/operation to a file?

Vimal Kansal
Ok, so here is what I am trying to do :

(1) once I am inside jboss-admin console and connected to server, I can
dump the jndi tree to the screen by doing this :

[standalone@localhost:9999 /] /subsystem=naming:jndi-view

but when I do this :

jboss-admin -c --command=/subsystem=naming:jndi-view

nothing happens.

Moreover, I think once I am inside the jboss-admin console, I should be
able to pipe the ouput to a file i.e something like this

[standalone@localhost:9999 /] /subsystem=naming:jndi-view >  cli.log

Thx

Vimal

On 15/07/2011 4:59 PM, Alexey Loubyansky wrote:

> Although, as Emanuel suggested once, making '--command=' optional would
> simplify the syntax, e.g.
>
> ./jboss-admin.sh -c :read-resource>  cli.log
>
> I think I'll do it.
>
> On 07/15/2011 08:50 AM, Alexey Loubyansky wrote:
>> This works
>>
>> ./jboss-admin.sh -c --command=:read-resource>   cli.log
>>
>> Alexey
>>
>> On 07/14/2011 03:46 AM, Vimal Kansal wrote:
>>> Hi,
>>>
>>> I am using jboss-admin cli tool.  I am not sure as to how do I pipe the
>>> output of any command/operation to a file?
>>>
>>> Thx
>>>
>>> Vimal
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: How do I pipe the output of a command/operation to a file?

Vimal Kansal
or, still better, if I could, from within jboss-admin console, fire off
an OS shell command.

On 16/07/2011 8:18 AM, Vimal Kansal wrote:

> Ok, so here is what I am trying to do :
>
> (1) once I am inside jboss-admin console and connected to server, I can
> dump the jndi tree to the screen by doing this :
>
> [standalone@localhost:9999 /] /subsystem=naming:jndi-view
>
> but when I do this :
>
> jboss-admin -c --command=/subsystem=naming:jndi-view
>
> nothing happens.
>
> Moreover, I think once I am inside the jboss-admin console, I should be
> able to pipe the ouput to a file i.e something like this
>
> [standalone@localhost:9999 /] /subsystem=naming:jndi-view>   cli.log
>
> Thx
>
> Vimal
>
> On 15/07/2011 4:59 PM, Alexey Loubyansky wrote:
>> Although, as Emanuel suggested once, making '--command=' optional would
>> simplify the syntax, e.g.
>>
>> ./jboss-admin.sh -c :read-resource>   cli.log
>>
>> I think I'll do it.
>>
>> On 07/15/2011 08:50 AM, Alexey Loubyansky wrote:
>>> This works
>>>
>>> ./jboss-admin.sh -c --command=:read-resource>    cli.log
>>>
>>> Alexey
>>>
>>> On 07/14/2011 03:46 AM, Vimal Kansal wrote:
>>>> Hi,
>>>>
>>>> I am using jboss-admin cli tool.  I am not sure as to how do I pipe the
>>>> output of any command/operation to a file?
>>>>
>>>> Thx
>>>>
>>>> Vimal
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: How do I pipe the output of a command/operation to a file?

Alexey Loubyansky
In reply to this post by Vimal Kansal
On 07/16/2011 12:18 AM, Vimal Kansal wrote:

> Ok, so here is what I am trying to do :
>
> (1) once I am inside jboss-admin console and connected to server, I can
> dump the jndi tree to the screen by doing this :
>
> [standalone@localhost:9999 /] /subsystem=naming:jndi-view
>
> but when I do this :
>
> jboss-admin -c --command=/subsystem=naming:jndi-view
>
> nothing happens.

Strange, just checked and it worked for me. Can you describe "nothing"?
:) It just quits? Nothing's printed?

> Moreover, I think once I am inside the jboss-admin console, I should be
> able to pipe the ouput to a file i.e something like this
>
> [standalone@localhost:9999 /] /subsystem=naming:jndi-view>   cli.log

Yes, Jason suggested that too some time ago. I think I'll look into this
this week.

Thanks,
Alexey

>
> Thx
>
> Vimal
>
> On 15/07/2011 4:59 PM, Alexey Loubyansky wrote:
>> Although, as Emanuel suggested once, making '--command=' optional would
>> simplify the syntax, e.g.
>>
>> ./jboss-admin.sh -c :read-resource>   cli.log
>>
>> I think I'll do it.
>>
>> On 07/15/2011 08:50 AM, Alexey Loubyansky wrote:
>>> This works
>>>
>>> ./jboss-admin.sh -c --command=:read-resource>    cli.log
>>>
>>> Alexey
>>>
>>> On 07/14/2011 03:46 AM, Vimal Kansal wrote:
>>>> Hi,
>>>>
>>>> I am using jboss-admin cli tool.  I am not sure as to how do I pipe the
>>>> output of any command/operation to a file?
>>>>
>>>> Thx
>>>>
>>>> Vimal
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev