Re: [SLUG] apt-get public key problem

2009-07-02 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote:

> Then if you decide to trust the key do:
> 
>gpg --export A0DEA09F895F7630 | sudo apt-get add -

And then do 'apt-get update' again.


Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] apt-get public key problem

2009-07-02 Thread Erik de Castro Lopo
david wrote:

> da...@david:~$ sudo apt-get install ubuntu-keyring
> [sudo] password for david:
> da...@david:~$ sudo apt-get install ubuntu-keyring
> [sudo] password for david:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> ubuntu-keyring is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Ah, hang on, the key you're looking for A0DEA09F895F7630 is not
a regular Ubuntu key, but rather is this:

gpg: key 895F7630: public key "Launchpad PPA for Rawstudio"

which is proably due to this part of your sources.list file:

deb http://fileserver:3142/ppa.launchpad.net/rawstudio/ppa/ubuntu intrepid 
main
deb http://fileserver:3142/ppa.launchpad.net/mscore-ubuntu/ppa/ubuntu 
intrepid main

The solution here is to grab the key using gpg:

   gpg --recv A0DEA09F895F7630

which resulted in the following output:

gpg: requesting key 895F7630 from hkp server wwwkeys.pgp.net
gpg: key 895F7630: public key "Launchpad PPA for Rawstudio" imported
gpg: Total number processed: 1
gpg:   imported: 1  (RSA: 1)

Then if you decide to trust the key do:

   gpg --export A0DEA09F895F7630 | sudo apt-get add -


HTH,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] apt-get public key problem

2009-07-02 Thread david



Erik de Castro Lopo wrote:

david wrote:


I've seen this message before when adding repositories without a
key, but I can't figure out what  is specifically
referring to.


This is referring to the GPG signed Release file that tells the apt-get
client what is in the release.

Usually this can be solved by doing :

   sudo apt-get update
   sudo apt-get install ubuntu-keyring




da...@david:~$ sudo apt-get install ubuntu-keyring
[sudo] password for david:
da...@david:~$ sudo apt-get install ubuntu-keyring
[sudo] password for david:
Reading package lists... Done
Building dependency tree
Reading state information... Done
ubuntu-keyring is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.


:(

David.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Peter Chubb
> "grove" == grove   writes:

grove> On Fri, 3 Jul 2009, Peter Chubb wrote:
>> Why use cat?
>> 
>> Why not > 
>> The extra process plus pipe just wastes resources.

grove> You've been reading too much Randal Schwartz.. ;)

grove> http://sial.org/howto/shell/useless-cat/

No I've never read that. But I come from a background running 60 users
on a pdp11-70 with 256k of core memory --- anything that used
unnecessary processes or memory was evil.
--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread grove

On Fri, 3 Jul 2009, Peter Chubb wrote:


Why use cat?

Why not 

You've been reading too much Randal Schwartz.. ;)

http://sial.org/howto/shell/useless-cat/


rachel

--
Rachel Polanskis Kingswood, Greater Western Sydney, Australia
gr...@zeta.org.auhttp://www.zeta.org.au/~grove/grove.html
   "The perversity of the Universe tends towards a maximum." - Finagle's Law
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Kyle

Thanks all.

Multiple options.  Will give them a go.



Kind Regards

Kyle


--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread James Polley
On Fri, Jul 3, 2009 at 9:08 AM, Kyle  wrote:

> Hi Folks,
>
> I am trying to extract a substring from a string found in a file.
>
> The string is: *** End   of  TF0220  at  Thu Jul 2 10:06:51 EST 2009  - RC
> =  0
>
> and the substring I want to extract is TF0220. This is a program name and
> the length of this name varies. In other words I want to extract whatever is
> between the words "of" and "at" in a script.


If the name is always at the same position in the string(ie, the line always
starts with "*** End   of " - "awk '{ print $4 ;}'" will do most of what you
want.

saga:~/src polleyj$ echo '*** End   of  TF0220  at  Thu Jul 2 10:06:51 EST
2009  - RC =  0' | awk '{ print $4 ;}'
TF0220

You probably want to do something extra to select out only lines matching
this pattern - you can do this by stipulating a match to awk - ie, make it
"awk '/End  of/ { print $4; }'"




>
> How would I likely go about that please?
>
> --
> 
> Kind Regards
>
> Kyle
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Phil Scarratt
Peter Chubb wrote:
>> "Phil" == Phil Scarratt  writes:
> Phil> Something like this would work:
> 
> Phil> cat  | perl -nle
> Phil> 'if(/^\*\*\*\s+End\s+of\s+([\S]+)\s+at\s+.*/){print $1;}'
> 
> 
> Why use cat?
> 
> Why not  
> The extra process plus pipe just wastes resources.
> 

Good point! But then again sed is probably a better option anyway

Fil
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Peter Chubb
> "Phil" == Phil Scarratt  writes:

Phil> Kyle wrote:
>> Hi Folks,
>> 
>> I am trying to extract a substring from a string found in a file.
>> 
>> The string is: *** End of TF0220 at Thu Jul 2 10:06:51 EST 2009 -
>> RC = 0
>> 
>> and the substring I want to extract is TF0220. This is a program
>> name and the length of this name varies. In other words I want to
>> extract whatever is between the words "of" and "at" in a script.
>> 
>> How would I likely go about that please?
>> 

Phil> Something like this would work:

Phil> cat  | perl -nle
Phil> 'if(/^\*\*\*\s+End\s+of\s+([\S]+)\s+at\s+.*/){print $1;}'


Why use cat?

Why not http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] apt-get public key problem

2009-07-02 Thread Erik de Castro Lopo
david wrote:

> I've seen this message before when adding repositories without a
> key, but I can't figure out what  is specifically
> referring to.

This is referring to the GPG signed Release file that tells the apt-get
client what is in the release.

Usually this can be solved by doing :

   sudo apt-get update
   sudo apt-get install ubuntu-keyring

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Phil Scarratt
Kyle wrote:
> Hi Folks,
> 
> I am trying to extract a substring from a string found in a file.
> 
> The string is: *** End   of  TF0220  at  Thu Jul 2 10:06:51 EST 2009  -
> RC =  0
> 
> and the substring I want to extract is TF0220. This is a program name
> and the length of this name varies. In other words I want to extract
> whatever is between the words "of" and "at" in a script.
> 
> How would I likely go about that please?
> 

Something like this would work:

cat  | perl -nle
'if(/^\*\*\*\s+End\s+of\s+([\S]+)\s+at\s+.*/){print $1;}'

Fil
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] apt-get public key problem

2009-07-02 Thread david
I've started getting this message when doing apt-get update (fileserver being the hostname of a 
local apt cache):


W: GPG error: http://fileserver intrepid Release: The following signatures couldn't be verified 
because the public key is not available:

 NO_PUBKEY A0DEA09F895F7630


I've seen this message before when adding repositories without a key, but I can't figure out what 
 is specifically referring to.


thanks...

David.

da...@david:~$ cat /etc/apt/sources.list
deb http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid main 
restricted
deb-src http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid main 
restricted

deb http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid-updates main 
restricted
deb-src http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid-updates 
main restricted

deb http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid universe
deb-src http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid universe
deb http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid-updates 
universe
deb-src http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid-updates 
universe

deb http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid multiverse
deb-src http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid multiverse
deb http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid-updates 
multiverse
deb-src http://fileserver:3142/au.archive.ubuntu.com/ubuntu/ intrepid-updates 
multiverse

deb http://fileserver:3142/security.ubuntu.com/ubuntu intrepid-security main 
restricted
deb-src http://fileserver:3142/security.ubuntu.com/ubuntu intrepid-security 
main restricted
deb http://fileserver:3142/security.ubuntu.com/ubuntu intrepid-security universe
deb-src http://fileserver:3142/security.ubuntu.com/ubuntu intrepid-security 
universe
deb http://fileserver:3142/security.ubuntu.com/ubuntu intrepid-security 
multiverse
deb-src http://fileserver:3142/security.ubuntu.com/ubuntu intrepid-security 
multiverse

deb http://fileserver:3142/ppa.launchpad.net/rawstudio/ppa/ubuntu intrepid main
deb http://fileserver:3142/ppa.launchpad.net/mscore-ubuntu/ppa/ubuntu intrepid 
main
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Peter Chubb
> "Kyle" == Kyle   writes:

Kyle> Hi Folks,

Kyle> I am trying to extract a substring from a string found in a
Kyle> file.

Kyle> The string is: *** End of TF0220 at Thu Jul 2 10:06:51 EST 2009
Kyle> - RC = 0

Simplest way is sed.

sed -n -e 's/^.*End of \([^ ]*\) at .*$/\1/p' filename

The regular expression matches an entire line, and throws away
everything but the bit you want.  I'm assuming that the bit you want
doesn't contain spaces, if it does, you need a different regular
expression. 

--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] Extracting string from a file - shell script

2009-07-02 Thread Dean Hamstead
in perl, depending on how strictly you want to enforce the format of the 
TF0220 (in this case, just any string between 'End of' and 'at'.


#!/usr/bin/perl
use warnings;
use strict;
my $string = q|*** End   of  TF0220  at  Thu Jul 2 10:06:51 EST 2009  - 
 RC =  0|;

my ($var) = $string =~ /End\s+of\s+([\w\d]+)\s+at/;
print $var if $var;


Dean

Kyle wrote:

Hi Folks,

I am trying to extract a substring from a string found in a file.

The string is: *** End   of  TF0220  at  Thu Jul 2 10:06:51 EST 2009  - 
RC =  0


and the substring I want to extract is TF0220. This is a program name 
and the length of this name varies. In other words I want to extract 
whatever is between the words "of" and "at" in a script.


How would I likely go about that please?



--
http://fragfest.com.au
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


[SLUG] Extracting string from a file - shell script

2009-07-02 Thread Kyle

Hi Folks,

I am trying to extract a substring from a string found in a file.

The string is: *** End   of  TF0220  at  Thu Jul 2 10:06:51 EST 2009  - 
RC =  0


and the substring I want to extract is TF0220. This is a program name 
and the length of this name varies. In other words I want to extract 
whatever is between the words "of" and "at" in a script.


How would I likely go about that please?

--

Kind Regards

Kyle

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html