leave & xargs

So if i had quite understood,if i want to pass through the command
leave anothere command like shutdown -h 23:20,i need to do
$ leave 2320 |xargs shutdown -h 23:20 is that correct?
franzi [ Mo, 26 November 2007 08:27 ] [ ID #1878655 ]

Re: leave & xargs

On 2007-11-26, franzi <hazzino [at] gmail.com> wrote:
>
>
> So if i had quite understood,if i want to pass through the command
> leave anothere command like shutdown -h 23:20,i need to do
> $ leave 2320 |xargs shutdown -h 23:20 is that correct?

What does the leave command do? Shutdown doesn't need more arguments
unless you want to give a reason for the shutdown.
Bill Marcum [ Mo, 26 November 2007 10:44 ] [ ID #1878658 ]

Re: leave & xargs

On 26 Nov, 10:44, Bill Marcum <marcumb... [at] bellsouth.net> wrote:
> On 2007-11-26, franzi <hazz... [at] gmail.com> wrote:
>
>
>
> > So if i had quite understood,if i want to pass through the command
> > leave anothere command like shutdown -h 23:20,i need to do
> > $ leave 2320 |xargs shutdown -h 23:20 is that correct?
>
> What does the leave command do? Shutdown doesn't need more arguments
> unless you want to give a reason for the shutdown.

it reminds you that you have to leave
franzi [ Mo, 26 November 2007 11:42 ] [ ID #1878659 ]

Re: leave & xargs

"franzi" <hazzino [at] gmail.com> schrieb im Newsbeitrag
news:5610ee57-9ef9-483a-9257-1940b234e3e9 [at] x69g2000hsx.google groups.com...
> On 26 Nov, 10:44, Bill Marcum <marcumb... [at] bellsouth.net> wrote:
>> On 2007-11-26, franzi <hazz... [at] gmail.com> wrote:
>>
>>
>>
>> > So if i had quite understood,if i want to pass through the command
>> > leave anothere command like shutdown -h 23:20,i need to do
>> > $ leave 2320 |xargs shutdown -h 23:20 is that correct?
>>
>> What does the leave command do? Shutdown doesn't need more arguments
>> unless you want to give a reason for the shutdown.
>
> it reminds you that you have to leave
xargs is meant to split command lines into chunks that don't exceed the max
length
here it doen't make sense, as calling shutdown more than once doesn't buy
much.
You could use:

shutdown -h 23:20 $(leave 2320)

and hope leave's output isn't too long to fit a single command line

Bye, Jojo
Joachim Schmitz [ Mo, 26 November 2007 11:54 ] [ ID #1878660 ]

Re: leave & xargs

franzi <hazzino [at] gmail.com> writes:

> it reminds you that you have to leave

shutdown warns users to log off. And if you ignore this warning, it
shuts down anyway.

You don't need "leave."

You can run "leave" in your non-root window, and run "shutdown" in a
root window if you wish. Try it and see if you like it.
Maxwell Lol [ Di, 27 November 2007 13:16 ] [ ID #1879537 ]

Re: leave & xargs

On 27 Nov, 13:16, Maxwell Lol <nos... [at] com.invalid> wrote:
> franzi <hazz... [at] gmail.com> writes:
> > it reminds you that you have to leave
>
> shutdown warns users to log off. And if you ignore this warning, it
> shuts down anyway.
>
> You don't need "leave."
>
> You can run "leave" in your non-root window, and run "shutdown" in a
> root window if you wish. Try it and see if you like it.

thanks to all
franzi [ Mi, 28 November 2007 08:04 ] [ ID #1880444 ]
Linux » comp.unix.shell » leave & xargs

Vorheriges Thema: Copying a bunch of images to one directory.
Nächstes Thema: shell script source getting actual path problem