public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* help with a bash script
@  Scott Berry
   ` Travis Siegel
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Scott Berry @  UTC (permalink / raw)
  To: speakup

Hello guys and gals,

One more question here.  I want to create a bas script for my Dad which does the following:
1 Does apt-get update and when apt-get update gets done it knows that it has been completed successfully.
2.  Do apt-get dist-upgrade and knows when it gets done.
3.  Do an apt-get clean.
Also for those who have more experience than me I have a question too.  Is it wiser for me to run that in a shell console of it's own or just have him run that under gnome terminal.  My goal at the very end is to cron this so this can run at night for him.

Scottat updates can be

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
   help with a bash script Scott Berry
@  ` Travis Siegel
     ` Scott Berry
   ` Gregory Nowak
   ` Sean McMahon
  2 siblings, 1 reply; 11+ messages in thread
From: Travis Siegel @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

You can just about anything you like in a cron job.  if it can run in  
a script, it can run as a job.
Secondly, just run the program (use the whole path and don't rely on  
the parcer of the interpreter to find it for you.  I.E. /usr/bin/more  
instead of just more.
This prevents hackers from overriding the programs being executed.
Also, when you put it in a cron job, the output of the job will be  
emailed to root (unless you specify otherwise) so you'll know if it  
worked or not.
But, most programs (and I'm sure appget is amoung them) have an error  
code to determine if they exited successfully or not.
Simply test for the code after the program ends if you really need to  
know, but it shouldn't matter, since you can view the output of the  
job if so desired.


On May 22, 2007, at 8:53 PM, Scott Berry wrote:

> Hello guys and gals,
>
> One more question here.  I want to create a bas script for my Dad  
> which does the following:
> 1 Does apt-get update and when apt-get update gets done it knows  
> that it has been completed successfully.
> 2.  Do apt-get dist-upgrade and knows when it gets done.
> 3.  Do an apt-get clean.
> Also for those who have more experience than me I have a question  
> too.  Is it wiser for me to run that in a shell console of it's own  
> or just have him run that under gnome terminal.  My goal at the  
> very end is to cron this so this can run at night for him.
>
> Scottat updates can be
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
   help with a bash script Scott Berry
   ` Travis Siegel
@  ` Gregory Nowak
     ` Scott Berry
   ` Sean McMahon
  2 siblings, 1 reply; 11+ messages in thread
From: Gregory Nowak @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There's no point in reinventing the wheel here. What you want to do is
most likely already done by the cron-apt package under debian, and
debian-based distros I imagine as well.

Greg


On Tue, May 22, 2007 at 07:53:12PM -0500, Scott Berry wrote:
> Hello guys and gals,
> 
> One more question here.  I want to create a bas script for my Dad which does the following:
> 1 Does apt-get update and when apt-get update gets done it knows that it has been completed successfully.
> 2.  Do apt-get dist-upgrade and knows when it gets done.
> 3.  Do an apt-get clean.
> Also for those who have more experience than me I have a question too.  Is it wiser for me to run that in a shell console of it's own or just have him run that under gnome terminal.  My goal at the very end is to cron this so this can run at night for him.
> 
> Scottat updates can be 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

- -- 
web site: http://www.romuald.net.eu.org
gpg public key: http://www.romuald.net.eu.org/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)

- --
Free domains: http://www.eu.org/ or mail dns-manager@EU.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD4DBQFGU/FF7s9z/XlyUyARAl+wAJYyhj8xYQk31H4ZSq93FqRQ3PXcAJ458A8s
lwlDyktVhlq8SzaablnveA==
=YX2R
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
   ` Travis Siegel
@    ` Scott Berry
  0 siblings, 0 replies; 11+ messages in thread
From: Scott Berry @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Hi Travis,

Can you please be just a little bit more specific please.  Okay so are you 
telling me that I would put in my script apt-get update
then /usr/bin/more
apt-get dist-upgrade
/usr/bin/more
aptget clean
End of Script?

Just not quite clear what you are trying to get me to do.

Scott


----- Original Message ----- 
From: "Travis Siegel" <tsiegel@softcon.com>
To: "Speakup is a screen review system for Linux." <speakup@braille.uwo.ca>
Sent: Tuesday, May 22, 2007 10:06 PM
Subject: Re: help with a bash script


> You can just about anything you like in a cron job.  if it can run in
> a script, it can run as a job.
> Secondly, just run the program (use the whole path and don't rely on
> the parcer of the interpreter to find it for you.  I.E. /usr/bin/more
> instead of just more.
> This prevents hackers from overriding the programs being executed.
> Also, when you put it in a cron job, the output of the job will be
> emailed to root (unless you specify otherwise) so you'll know if it
> worked or not.
> But, most programs (and I'm sure appget is amoung them) have an error
> code to determine if they exited successfully or not.
> Simply test for the code after the program ends if you really need to
> know, but it shouldn't matter, since you can view the output of the
> job if so desired.
>
>
> On May 22, 2007, at 8:53 PM, Scott Berry wrote:
>
>> Hello guys and gals,
>>
>> One more question here.  I want to create a bas script for my Dad
>> which does the following:
>> 1 Does apt-get update and when apt-get update gets done it knows
>> that it has been completed successfully.
>> 2.  Do apt-get dist-upgrade and knows when it gets done.
>> 3.  Do an apt-get clean.
>> Also for those who have more experience than me I have a question
>> too.  Is it wiser for me to run that in a shell console of it's own
>> or just have him run that under gnome terminal.  My goal at the
>> very end is to cron this so this can run at night for him.
>>
>> Scottat updates can be
>> _______________________________________________
>> Speakup mailing list
>> Speakup@braille.uwo.ca
>> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>>
>>
>
>
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 5/21/2007 
> 2:01 PM
>
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
   ` Gregory Nowak
@    ` Scott Berry
       ` Dawes, Stephen
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Berry @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Well actually Greg this is Fedora fc6 and my father's a beginner so I want 
to use apt-get instead of yum for him and I find it much easier to read from 
a windows box or other wise I would agree with you.

Scott


----- Original Message ----- 
From: "Gregory Nowak" <greg@romuald.net.eu.org>
To: "Speakup is a screen review system for Linux." <speakup@braille.uwo.ca>
Sent: Wednesday, May 23, 2007 2:46 AM
Subject: Re: help with a bash script


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> There's no point in reinventing the wheel here. What you want to do is
> most likely already done by the cron-apt package under debian, and
> debian-based distros I imagine as well.
>
> Greg
>
>
> On Tue, May 22, 2007 at 07:53:12PM -0500, Scott Berry wrote:
>> Hello guys and gals,
>>
>> One more question here.  I want to create a bas script for my Dad which 
>> does the following:
>> 1 Does apt-get update and when apt-get update gets done it knows that it 
>> has been completed successfully.
>> 2.  Do apt-get dist-upgrade and knows when it gets done.
>> 3.  Do an apt-get clean.
>> Also for those who have more experience than me I have a question too. 
>> Is it wiser for me to run that in a shell console of it's own or just 
>> have him run that under gnome terminal.  My goal at the very end is to 
>> cron this so this can run at night for him.
>>
>> Scottat updates can be
>> _______________________________________________
>> Speakup mailing list
>> Speakup@braille.uwo.ca
>> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
> - -- 
> web site: http://www.romuald.net.eu.org
> gpg public key: http://www.romuald.net.eu.org/pubkey.asc
> skype: gregn1
> (authorization required, add me to your contacts list first)
>
> - --
> Free domains: http://www.eu.org/ or mail dns-manager@EU.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD4DBQFGU/FF7s9z/XlyUyARAl+wAJYyhj8xYQk31H4ZSq93FqRQ3PXcAJ458A8s
> lwlDyktVhlq8SzaablnveA==
> =YX2R
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 5/21/2007 
> 2:01 PM
>
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: help with a bash script
     ` Scott Berry
@      ` Dawes, Stephen
         ` Scott Berry
  0 siblings, 1 reply; 11+ messages in thread
From: Dawes, Stephen @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Scott,

Yum works much better then apt in fedora. It is simply a case of
learning the syntax. 
yum install  -- to install a package.
yum update -- to update the system
yum remove -- to remove a package.

By default, yum is setup to automatically update the system through
cron. I think it is nightly, but I don't remember exactly, because I
changed my to run weekly.

Steve Dawes
Phone: (403) 268-5527
Email: SDawes@calgary.ca


NOTICE -
This communication is intended ONLY for the use of the person or entity named above and may contain information that is confidential or legally privileged. If you are not the intended recipient named above or a person responsible for delivering messages or communications to the intended recipient, YOU ARE HEREBY NOTIFIED that any use, distribution, or copying of this communication or any of the information contained in it is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone and then destroy or delete this communication, or return it to us by mail if requested by us. The City of Calgary thanks you for your attention and co-operation.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
       ` Dawes, Stephen
@        ` Scott Berry
           ` Dawes, Stephen
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Berry @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

That's right I remember that now Steve.  How does one get yum to cron then? 
Is it just a matter of setting chkconfig and the levels you want to run at?

Scott
----- Original Message ----- 
From: "Dawes, Stephen" <Stephen.Dawes@calgary.ca>
To: "Speakup is a screen review system for Linux." <speakup@braille.uwo.ca>
Sent: Wednesday, May 23, 2007 8:53 AM
Subject: RE: help with a bash script


> Scott,
>
> Yum works much better then apt in fedora. It is simply a case of
> learning the syntax.
> yum install  -- to install a package.
> yum update -- to update the system
> yum remove -- to remove a package.
>
> By default, yum is setup to automatically update the system through
> cron. I think it is nightly, but I don't remember exactly, because I
> changed my to run weekly.
>
> Steve Dawes
> Phone: (403) 268-5527
> Email: SDawes@calgary.ca
>
>
> NOTICE -
> This communication is intended ONLY for the use of the person or entity 
> named above and may contain information that is confidential or legally 
> privileged. If you are not the intended recipient named above or a person 
> responsible for delivering messages or communications to the intended 
> recipient, YOU ARE HEREBY NOTIFIED that any use, distribution, or copying 
> of this communication or any of the information contained in it is 
> strictly prohibited. If you have received this communication in error, 
> please notify us immediately by telephone and then destroy or delete this 
> communication, or return it to us by mail if requested by us. The City of 
> Calgary thanks you for your attention and co-operation.
>
>
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 5/21/2007 
> 2:01 PM
>
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: help with a bash script
         ` Scott Berry
@          ` Dawes, Stephen
  0 siblings, 0 replies; 11+ messages in thread
From: Dawes, Stephen @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Scott,

It is already running. Look in the /etc/cron.daily directory, and you
should see a yum* script. 
Basically, it is checking for updates by default. That is to say, as
long as you haven't stopped the automatic starting of yum in chkconfig. 
Do a 
ps -e |grep yum  
to confirm that yum is running, and that is all you need to do.
If you want yum to clean up on a scheduled bases, then schedule a yum
clean all or whatever level of clean you are needing.

Steve Dawes
Phone: (403) 268-5527
Email: SDawes@calgary.ca
 
 


NOTICE -
This communication is intended ONLY for the use of the person or entity named above and may contain information that is confidential or legally privileged. If you are not the intended recipient named above or a person responsible for delivering messages or communications to the intended recipient, YOU ARE HEREBY NOTIFIED that any use, distribution, or copying of this communication or any of the information contained in it is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone and then destroy or delete this communication, or return it to us by mail if requested by us. The City of Calgary thanks you for your attention and co-operation.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
   help with a bash script Scott Berry
   ` Travis Siegel
   ` Gregory Nowak
@  ` Sean McMahon
  2 siblings, 0 replies; 11+ messages in thread
From: Sean McMahon @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

hmm,  would autoapt to what you want?
----- Original Message ----- 
From: "Scott Berry" <sberry@northlc.com>
To: <speakup@braille.uwo.ca>
Sent: Tuesday, May 22, 2007 5:53 PM
Subject: help with a bash script


> Hello guys and gals,
>
> One more question here.  I want to create a bas script for my Dad which does 
> the following:
> 1 Does apt-get update and when apt-get update gets done it knows that it has 
> been completed successfully.
> 2.  Do apt-get dist-upgrade and knows when it gets done.
> 3.  Do an apt-get clean.
> Also for those who have more experience than me I have a question too.  Is it 
> wiser for me to run that in a shell console of it's own or just have him run 
> that under gnome terminal.  My goal at the very end is to cron this so this 
> can run at night for him.
>
> Scottat updates can be
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with a bash script
   Jude DaShiell
@  ` Littlefield, Tyler
  0 siblings, 0 replies; 11+ messages in thread
From: Littlefield, Tyler @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

thanks. I'll check in to it.

Thanks,
~~TheCreator~~
[My programs don't have bugs; just randomly added features]
msn:
compgeek13@gmail.com
aim: st8amnd2005
skype: st8amnd127
vertigo head coder
web: tysdomain.com
----- Original Message ----- 
From: "Jude DaShiell" <jdashiel@shellworld.net>
To: <speakup@braille.uwo.ca>
Sent: Sunday, May 27, 2007 9:50 PM
Subject: re: help with a bash script


> Before writing that script, you might find the cron-apt package does all 
> that you need done once you get it configured correctly.
> 
> 
> 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup


^ permalink raw reply	[flat|nested] 11+ messages in thread

* re: help with a bash script
@  Jude DaShiell
   ` Littlefield, Tyler
  0 siblings, 1 reply; 11+ messages in thread
From: Jude DaShiell @  UTC (permalink / raw)
  To: speakup

Before writing that script, you might find the cron-apt package does all 
that you need done once you get it configured correctly.




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 help with a bash script Scott Berry
 ` Travis Siegel
   ` Scott Berry
 ` Gregory Nowak
   ` Scott Berry
     ` Dawes, Stephen
       ` Scott Berry
         ` Dawes, Stephen
 ` Sean McMahon
 Jude DaShiell
 ` Littlefield, Tyler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).