PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > at-command
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

at-command

Réponse
 
LinkBack Outils de la discussion
Vieux 24/03/2008, 10h23   #1
Salve Håkedal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut at-command

Jobs to be executed can be listed with
$ atq
but that don't tell me what the job/command to be executed _is_.
I can get that with
$ at -c 'job-number from the atq-command'
but only for each line at a time.

I'd like to have one command that gives a lists like i.e:
...
8 2008-03-30 23:00 mv file file2
9 2008-03-30 23:00 cp img img2
...
and I'm surprised that I can't find one.
If it really don't exist, I'm shure some of you can make a script to do
it!

--
Salve

  Réponse avec citation
Vieux 24/03/2008, 12h07   #2
Theo v. Werkhoven
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: at-command

The carbonbased lifeform Salve Håkedal inspired comp.unix.shell with:
> Jobs to be executed can be listed with
> $ atq
> but that don't tell me what the job/command to be executed _is_.
> I can get that with
> $ at -c 'job-number from the atq-command'
> but only for each line at a time.
>
> I'd like to have one command that gives a lists like i.e:
> ..
> 8 2008-03-30 23:00 mv file file2
> 9 2008-03-30 23:00 cp img img2
> ..
> and I'm surprised that I can't find one.
> If it really don't exist, I'm shure some of you can make a script to do
> it!


#v+
for i in $(atq|cut -f1); do
echo -n $(atq $i|cut -d" " -f1-2)
echo " "$(at -c $i|tail -2)
done
#v-

8 2008-03-24 12:18 touch attest2
7 2008-03-24 12:18 touch attest1
9 2008-03-24 12:18 touch attest3

Theo
--
theo at van-werkhoven.nl ICQ:277217131 SuSE Linux
linuxcounter.org: 99872 Jabber:muadib at jabber.xs4all.nl AMD XP3000+ 1024MB
"ik _heb_ niets tegen Microsoft, ik heb iets tegen
de uitwassen *van* Microsoft"
  Réponse avec citation
Vieux 24/03/2008, 12h28   #3
Salve Håkedal
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: at-command

On 2008-03-24, Theo v. Werkhoven <theo@van-werkhoven.nl.invalid> wrote:
> The carbonbased lifeform Salve Håkedal inspired comp.unix.shell with:
>> Jobs to be executed can be listed with
>> $ atq
>> but that don't tell me what the job/command to be executed _is_.
>> I can get that with
>> $ at -c 'job-number from the atq-command'
>> but only for each line at a time.
>>
>> I'd like to have one command that gives a lists like i.e:
>> ..
>> 8 2008-03-30 23:00 mv file file2
>> 9 2008-03-30 23:00 cp img img2
>> ..
>> and I'm surprised that I can't find one.
>> If it really don't exist, I'm shure some of you can make a script to do
>> it!

>
> #v+
> for i in $(atq|cut -f1); do
> echo -n $(atq $i|cut -d" " -f1-2)
> echo " "$(at -c $i|tail -2)
> done
> #v-
>
> 8 2008-03-24 12:18 touch attest2
> 7 2008-03-24 12:18 touch attest1
> 9 2008-03-24 12:18 touch attest3
>
> Theo


Nice. Thank you!
--
Salve
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h34.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09795 seconds with 11 queries