Jonathan Dowland wrote:
> On Sun, Nov 03, 2013 at 09:58:58PM +0100, Erwan David wrote:
>> Maybe you'll need something like expect to handle this.
> I'd second expect, it's probably the best tool for the job in all
> non-trivial cases.
The "empty-expect" package, perhaps?
Chris
--
To UNSUBSCRI
On 11/4/13, Thomas H. George wrote:
> The script I am trying to write executes a program that requires a
> keyboard response. I have experimented with redirecting STDIN but haven't
> found the
> correct way to make the response.
To read a value (perhaps half your "problem"):
apt-cache show ...
z
Hi
On Sun, Nov 03, 2013 at 02:35:30PM -0500, Thomas H. George wrote:
> The script I am trying to write executes a program that requires a
> keyboard response. I have experimented with redirecting STDIN but haven't
> found the
> correct way to make the response. I found one example that scanned t
The tool 'yes' can be used to write an infinite stream of strings
(the default being 'y') to standard output, so if your program needed
only a sequence of a fixed string such as 'y', you could do
> yes | your-program
or
> yes "some-other-string" | your-program
But if your program is not readin
Le 03/11/2013 20:35, Thomas H. George a écrit :
> The script I am trying to write executes a program that requires a
> keyboard response. I have experimented with redirecting STDIN but haven't
> found the
> correct way to make the response. I found one example that scanned the
> response from apt
> The script I am trying to write executes a program
> that requires a keyboard response.
>
A varaible can be set to a keyboard response
using a read prompt
read -e -p "What do you need ?" xVariable
echo $xVariable
--
Stanley C. Kitching
Human Being
Phoenix, Arizon
The script I am trying to write executes a program that requires a
keyboard response. I have experimented with redirecting STDIN but haven't found
the
correct way to make the response. I found one example that scanned the
response from apt-get install for the letter y and fed this back to
in
On Tue, Apr 17, 2012 at 4:52 PM, Eduardo M KALINOWSKI
wrote:
> On Ter, 17 Abr 2012, Chris wrote:
>> I would like have the Smtp: replaced with To: leaving all that follows in
>> each line untouched and piped into a new file.
>
> man sed
>
Read that too, but try also searching online for "sed tuto
perl -e 'while(<>){chomp; s/root/Root/g; print "$_\n"; }' /etc/passwd
Il giorno 17 aprile 2012 15:52, Eduardo M KALINOWSKI <
edua...@kalinowski.com.br> ha scritto:
> On Ter, 17 Abr 2012, Chris wrote:
>
>> Firstly I petty much suck at scripting so I need help.
>>
>> I have a file where each lin
On Ter, 17 Abr 2012, Chris wrote:
Firstly I petty much suck at scripting so I need help.
I have a file where each line begins with
Smtp:
I would like have the Smtp: replaced with To: leaving all that
follows in each line untouched and piped into a new file.
man sed
--
The majority of hu
All
Firstly I petty much suck at scripting so I need help.
I have a file where each line begins with
Smtp:
I would like have the Smtp: replaced with To: leaving all that follows in each
line untouched and piped into a new file.
Thanks!!
Chris
On 11/02/2010 05:04 AM, Karl Vogel wrote:
>On the other hand, if someone sneaks something like
>result_04: dc="3" rm /something/valuable
Thank you! very informative, and, kinda fun to read.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscr
>> On Mon, 01 Nov 2010 15:49:01 +0800,
>> Zhang Weiwu said:
Z> A program output is like this:
Z> result_01: a="23" b="288" c="A_string" ac="34"
Z> result_02: a="23" b="28" c="A_string_too" dc="3"
Z>
Z> I am writing a script to output values of b if b is in the result set.
If your
Hello.
A program output is like this:
result_01: a="23" b="288" c="A_string" ac="34"
result_02: a="23" b="28" c="A_string_too" dc="3"
I am writing a script to output values of b if b is in the result set.
It would be rather easy to match value of with regular expression:
/b="([^"]*)"/ #
Here's something I modified as part of a benchmark script called "fdtree".
--
Karl Vogel I don't speak for the USAF or my company
Dijkstra probably hates me. --Linus Torvalds, in kernel/sched.c
#!/bin/bash
# How to use xdate/xtime/persec:
#
# START=$(date "+%s")
On 2010-03-29 16:35, Mike McClain wrote:
[snip]
Thanks a lot. Though my error was pointed out as a typo and corrected
a while back your solution using " date '+%s' " is much more elegant
than what I had done.
If you want more (possibly too much) precision:
$ date +'%s.%N'
--
"History does not
Hi Josep,
On Mon, Mar 29, 2010 at 02:28:20PM +0200, Josep M. wrote:
>
> I found these somewhere time ago. check if is what You need:
>
Thanks a lot. Though my error was pointed out as a typo and corrected
a while back your solution using " date '+%s' " is much more elegant
than what I had don
Hello.
I found these somewhere time ago. check if is what You need:
function timer()
{
if [[ $# -eq 0 ]]; then
echo $(date '+%s')
else
local stime=$1
etime=$(date '+%s')
if [[ -z "$stime" ]]; then stime=$etime; fi
dt=$((etime - stime)
Paul E Condon wrote:
Try:
bgn=$(date +%s)
sleep 7
end=$(date +%s)
echo "elapsed seconds = " $(( end - bgn ))
You might also want to experiment with:
ps h -o etime $$
as long as you're happy with it only running under gnu. Prints the
elapsed time for the shell.
--
Chris Jackson
Shadowcat
On 20100319_101928, Mike McClain wrote:
> I've written a function to print elapsed time similar to /usr/bin/time
> but can be called at the beginning and end of a script from within
> the script. Occasionally I get an error: '8-08: value too great for base'
> It's caused by the difference in these
On Fri, Mar 19, 2010 at 06:45:15PM +0100, Sven Joachim wrote:
> On 2010-03-19 18:19 +0100, Mike McClain wrote:
>
> > I've written a function to print elapsed time similar to /usr/bin/time
> > but can be called at the beginning and end of a script from within
> > the script. Occasionally I get an e
On Fri, Mar 19, 2010 at 10:19:28AM -0700, Mike McClain wrote:
typo right herevv
> now='09:07:16'; startHr=${now%%:*}; startHR=${startHr#*0}; echo $startHr;
Apologies for troubling all.
Mike (with egg on face)
--
Satisfied user of Linux since 1997.
O< ascii ribbon c
Mike McClain wrote:
I've written a function to print elapsed time similar to /usr/bin/time
but can be called at the beginning and end of a script from within
the script. Occasionally I get an error: '8-08: value too great for base'
It's caused by the difference in these 2 command strings but I ca
Mike McClain wrote:
I've written a function to print elapsed time similar to /usr/bin/time
but can be called at the beginning and end of a script from within
the script. Occasionally I get an error: '8-08: value too great for base'
It's caused by the difference in these 2 command strings but I c
On Fri, Mar 19, 2010 at 1:19 PM, Mike McClain wrote:
> I've written a function to print elapsed time similar to /usr/bin/time
> but can be called at the beginning and end of a script from within
> the script. Occasionally I get an error: '8-08: value too great for base'
> It's caused by the diffe
On 2010-03-19 18:19 +0100, Mike McClain wrote:
> I've written a function to print elapsed time similar to /usr/bin/time
> but can be called at the beginning and end of a script from within
> the script. Occasionally I get an error: '8-08: value too great for base'
> It's caused by the difference i
I've written a function to print elapsed time similar to /usr/bin/time
but can be called at the beginning and end of a script from within
the script. Occasionally I get an error: '8-08: value too great for base'
It's caused by the difference in these 2 command strings but I can't for
the life of m
Kumar Appaiah wrote:
On Wed, Jul 01, 2009 at 09:28:23AM -0500, Kumar Appaiah wrote:
for i in *zzz;do
mv "$i" $(echo "$i"|sed 's/^...//');
done
But I'd recommend one of these: mrename, krename, gprename,
renameutils and more (all apt-gettable, of course).
Oh, and I think prename (or just renam
On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> I am sure that this is an easy question for those people who do any
> reasonable amount of scripting. I'm just not one of them.
>
> How can I rename all of the files ina directory with the new name being
> the old name stripped of
Marc Shapiro writes:
> I am sure that this is an easy question for those people who do any
> reasonable amount of scripting. I'm just not one of them.
>
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters. If all
> of
On 2009-07-01 18:20 (+0300), Teemu Likonen wrote:
> find -type f -print0 | xargs -0 sh -c 'for file in "$@";
> do dir=$(dirname -- "$file") && base=$(basename -- "$file") &&
> (cd "$dir" && echo mv -- "$base" "${base#???}"); done' ignore
Let's simplify it a bit:
find -type f
On 2009-07-01 07:22 (-0700), Marc Shapiro wrote:
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters. If all
> of the files are off the format:
>
> xxxy.zzz
>
> I want the new names to be of th
In <4a4b7129.7010...@yahoo.com>, Marc Shapiro wrote:
>I am sure that this is an easy question for those people who do any
>reasonable amount of scripting. I'm just not one of them.
>
>How can I rename all of the files ina directory with the new name being
>the old name stripped of its leftmost thr
Marc Shapiro writes:
[...]
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters.
My favorite way to do this is with sed and xargs. First have sed
print the current name, then use an regexp to change it to the new
On Wed, Jul 01, 2009 at 09:28:23AM -0500, Kumar Appaiah wrote:
> On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> > How can I rename all of the files ina directory with the new name
> > being the old name stripped of its leftmost three characters. If
> > all of the files are off the
On Wed, Jul 01, 2009 at 07:22:33AM -0700, Marc Shapiro wrote:
> How can I rename all of the files ina directory with the new name
> being the old name stripped of its leftmost three characters. If
> all of the files are off the format:
>
> xxxy.zzz
>
> I want the new na
I am sure that this is an easy question for those people who do any
reasonable amount of scripting. I'm just not one of them.
How can I rename all of the files ina directory with the new name being
the old name stripped of its leftmost three characters. If all of the
files are off the format
On Thu, 10 Jul 2008 17:04:38 -0500, Kent West wrote:
>> tar -cvzf - --one-file-system /home | split -b 2000m -
Side note since the problem has been solved.
You might want to look into dar, which will do splitting for you
automatically, as well as many other desired features for backup
(incremen
Owen Townend wrote:
Kent West wrote:
Am I just not seeing a typo somewhere? Why is my script failing?
Hey,
You're missing the '-' for stdin
tar -czvf - --one-file-system $sourceDir | split -b 2000m - $targetFile
Ah, thank you!
--
Kent West <")))><
West
> > tar -cvzf - --one-file-system /home | split -b 2000m -
> /TERASTATIONBACKUP/GOSHEN/2008/2008-Jul-10.tgz
vs
> > tar -czvf - --one-file-system $sourceDir | split -b 2000m $targetFile
> Am I just not seeing a typo somewhere? Why is my script failing?
>
> Thanks!
Hey,
You're missing the '-' fo
I have this script (stripped down to basics):
#!/bin/bash
sourceDir='/home/'# Directory you're backing up
targetDir='/TERASTATIONBACKUP/GOSHEN/'$(date +%Y)# Destination
directory for the tarball
targFileBase='GoshensHome'# Desired base part of the
tarball's
On 21.09.07 08:18, Michael Martinell wrote:
> My script is as follows:
> #!/bin/sh
>
> TERM=vt100
> export TERM
forcing TERM in script is very bad idea, and in this script also useless.
> date && echo " Spam Count" && /bin/more /var/log/syslog | /bin/grep -c
> 'identified spam' && echo " " && ec
Richard Lyons <[EMAIL PROTECTED]>:
> On Thu, Nov 01, 2007 at 01:49:03PM -0700, Mike Bird wrote:
> > On Thursday 01 November 2007 13:07, Wei Chen wrote:
> > > I would like to write a bash script like the following one:
> > >
> > > for i in `some program that outputs a word list`
> > > do
> > > ec
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mike Bird wrote:
> On Thursday 01 November 2007 13:07, Wei Chen wrote:
>> I would like to write a bash script like the following one:
>>
>> for i in `some program that outputs a word list`
>> do
>> echo $i
>> done
>>
>> where the word list can be ver
On 11/01/07 15:07, Wei Chen wrote:
> Hi,
>
> I would like to write a bash script like the following one:
>
> for i in `some program that outputs a word list`
> do
> echo $i
> done
>
> where the word list can be very very long. I wonder what is the upper bound
> limit of the length of word list
On Thu, Nov 01, 2007 at 01:49:03PM -0700, Mike Bird wrote:
> On Thursday 01 November 2007 13:07, Wei Chen wrote:
> > I would like to write a bash script like the following one:
> >
> > for i in `some program that outputs a word list`
> > do
> > echo $i
> > done
> >
> > where the word list can be
On Thursday 01 November 2007 13:07, Wei Chen wrote:
> I would like to write a bash script like the following one:
>
> for i in `some program that outputs a word list`
> do
> echo $i
> done
>
> where the word list can be very very long. I wonder what is the upper bound
> limit of the length of wor
Hi,
I would like to write a bash script like the following one:
for i in `some program that outputs a word list`
do
echo $i
done
where the word list can be very very long. I wonder what is the upper bound
limit of the length of word lists in "for" loop of a bash script, or
does it only
depend
One possible approach would be to use a few files and use paste on those
files where:
dfile holds date,
mfile holds good messages,
sfile holds spam messages
tfile is temporary file
paste dfile mfile >tfile
paste tfile sfile >dfile
rm mfile
rm sfile
rm tfile
cat dfile
hth.
--
To UNSUBSCRIB
On 21-sep-2007, at 15:51, Michael Martinell wrote:
Thanks - that was exactly what I was looking for.
Now I just need to find a good scripting tutorial. :)
Try http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html
That's where I learned my scripting basics.
Peter
--
To UNSUBSCRI
Thanks - that was exactly what I was looking for.
Now I just need to find a good scripting tutorial. :)
-Original Message-
From: Michael Marsh [mailto:[EMAIL PROTECTED]
Sent: Friday, September 21, 2007 8:38 AM
To: debian-user@lists.debian.org
Subject: Re: scripting question
On 9/21/07
On 9/21/07, Michael Martinell <[EMAIL PROTECTED]> wrote:
> I have a simple script that counts up the number of spam messages each day
> and prints the total number into a text field. This is fine as far as it
> goes, however I would like to also include the date and the number of
> non-spam messag
Man echo reveals that the -n switch prevents echo from appending a new
line. Also, you do not need to use more (or less) with grep. Grep can
take a file agrument. Refer to grep's man page for more information.
--
Neil Watson | Debian Linux
System Administrator| Uptime 6 days
ht
I have a simple script that counts up the number of spam messages each day
and prints the total number into a text field. This is fine as far as it
goes, however I would like to also include the date and the number of
non-spam messages.
I can get this to run, however each piece of information
Tyler Smith wrote:
On 2007-05-17, Bob McGowan <[EMAIL PROTECTED]> wrote:
Some general comments, mostly aimed at making your code cleaner without
changing what it does.
First, both 'echo' and 'printf' put their results on standard out. Your
call of 'printf' is inside command substitution, so
On Thu, May 17, 2007 at 03:40:15AM +, Tyler Smith wrote:
> On 2007-05-17, Bob McGowan <[EMAIL PROTECTED]> wrote:
> >
> > Some general comments, mostly aimed at making your code cleaner without
> > changing what it does.
> >
> > First, both 'echo' and 'printf' put their results on standard out.
On 2007-05-17, Bob McGowan <[EMAIL PROTECTED]> wrote:
>
> Some general comments, mostly aimed at making your code cleaner without
> changing what it does.
>
> First, both 'echo' and 'printf' put their results on standard out. Your
> call of 'printf' is inside command substitution, so its STDOUT
Tyler Smith wrote:
Hi,
I've got a question about a short bash script I wrote. I need it to
--snipped--
#!/bin/bash
lab_num=41
for map_name in aest_90 bush_90 carol_90 comp_90 \
hirs_90 roan_90 swan_90 vir_90 ;
do
lab_let=$(echo -n $(printf "\\x$(echo $lab_num)"))
echo "
$la
On 2007-05-16, Karl E. Jorgensen <[EMAIL PROTECTED]> wrote:
>> This was the only way I could figure out to loop from A to H. But
>> since it works on hex escape codes, it won't work past 9. Is there a
>> cleaner, more general way to do this?
>
> I think there is:
>
> #!/bin/bash
>
> ( cat < A aest_
On Wed, May 16, 2007 at 08:46:37PM +, Tyler Smith wrote:
> Hi,
>
> I've got a question about a short bash script I wrote. I need it to
> loop over a number of names, and pass a command to grass that includes
> two variations of those names. That was easy. Harder was getting
> getting a letter
Hi,
I've got a question about a short bash script I wrote. I need it to
loop over a number of names, and pass a command to grass that includes
two variations of those names. That was easy. Harder was getting
getting a letter included in each iteration, starting with A for the
first one and going u
Having all that whitespace in the 'wrong' spot breaks the idea of
splitting words based on their being surrounded by whitespace. So get
rid of __all__ whitespace. Then use other logic find what you want.
E.g. if you want the 'word' following the 'word' processor, find the
first occurance of 'proc
On Wed, 2006-11-29 at 09:36 -0900, Ken Irving wrote:
> On Wed, Nov 29, 2006 at 02:32:37PM +, michael wrote:
> > I guess a complete rephrase is best.
> >
> > What I want is "how many processors does each WAITING job in lsf queues
> > require?". From 'bhist' I get outputs such as below (see whi
On Wed, Nov 29, 2006 at 02:32:37PM +, michael wrote:
> I guess a complete rephrase is best.
>
> What I want is "how many processors does each WAITING job in lsf queues
> require?". From 'bhist' I get outputs such as below (see whitespace
> anywhere in "num Processors") and cannot determine a
I guess a complete rephrase is best.
What I want is "how many processors does each WAITING job in lsf queues
require?". From 'bhist' I get outputs such as below (see whitespace
anywhere in "num Processors") and cannot determine a sure way of always
parsing it...
Thanks, Michael
EXAMPLES:
~/b
On Mon, 2006-11-06 at 01:10 +1100, John O'Hagan wrote:
> Or the whole thing could even be done with (I think!):
>
> #tr -d '\n' < IN | tr ' ' '\n' | grep -B1 Processor | grep -v 'Processor\|--'
>
> i.e., remove the newlines, replace all the spaces with newlines, then grep
> for
> the line befo
John O'Hagan wrote:
> On Thursday 09 November 2006 03:40, Andrew Sackville-West wrote:
>> SO I wonder what happened to the OP? Is he just watching waiting for
>> the right solution, or is he long gone?
> [...]
> OP? What OP? :)
The one who hopefully got an A for his answer.
--
Ste
On Thursday 09 November 2006 03:40, Andrew Sackville-West wrote:
> On Thu, Nov 09, 2006 at 12:52:57AM +1100, John O'Hagan wrote:
[...]
> >
> > while read i ; do
> >
> > if [[ $(echo "$i" | grep \\-\$ ) ]]; then
> >
> > i=$( echo "$i" | sed s/-\$//)
> >
On Thu, Nov 09, 2006 at 12:52:57AM +1100, John O'Hagan wrote:
> >
> > tr -d '-\n' >
> > | grep -v 'Processor\|--'
> >
>
> [...]
>
> Aha! You're right, my lines fail on the edge cases, and also when the target
> word is hyphenated.
>
> Your ingenious approach didn't always work either [1]; but
On Wednesday 08 November 2006 03:08, Andrew Sackville-West wrote:
> On Wed, Nov 08, 2006 at 02:51:20AM +1100, John O'Hagan wrote:
> > I tried this, and found that replacing the newlines with spaces stops the
> > grep from working because it puts spaces in the middle of any occurrences
> > of "Proce
On Tue, Nov 07, 2006 at 09:36:27AM -0900, Ken Irving wrote:
> On Tue, Nov 07, 2006 at 08:08:12AM -0800, Andrew Sackville-West wrote:
> > On Wed, Nov 08, 2006 at 02:51:20AM +1100, John O'Hagan wrote:
> > > ...
> > >
> > > Have we done this to death yet? :)
> >
> > there must be more. I haven't se
On Tue, Nov 07, 2006 at 08:08:12AM -0800, Andrew Sackville-West wrote:
> On Wed, Nov 08, 2006 at 02:51:20AM +1100, John O'Hagan wrote:
> > ...
> >
> > Have we done this to death yet? :)
>
> there must be more. I haven't seen any perl junkies provide us with
> some permutation of ($*^&*%^^@@Pro
On Wed, Nov 08, 2006 at 02:51:20AM +1100, John O'Hagan wrote:
>
> I tried this, and found that replacing the newlines with spaces stops the
> grep
> from working because it puts spaces in the middle of any occurrences
> of "Processor", but I see what you mean about the edge case. I think this
On Tue, Nov 07, 2006 at 08:56:55AM -0500, Douglas Tutty wrote:
> On Mon, Nov 06, 2006 at 10:26:53PM -0600, Russell L. Harris wrote:
> > Andrew Sackville-West wrote:
> > >On Mon, Nov 06, 2006 at 01:34:30PM -0800, Steve Lamb wrote:
> > >>Depends on what you define as elegant.
> > >
> > >when I wa
On Tuesday 07 November 2006 02:55, Andrew Sackville-West wrote:
> On Tue, Nov 07, 2006 at 01:00:34AM +1100, John O'Hagan wrote:
[...]
> > You're right; but the OP, Michael, gave the above scenario as his
> > problem. If your situation were the case, though, I guess we could use tr
> > -d '-' to g
On Mon, Nov 06, 2006 at 10:26:53PM -0600, Russell L. Harris wrote:
> Andrew Sackville-West wrote:
> >On Mon, Nov 06, 2006 at 01:34:30PM -0800, Steve Lamb wrote:
> >>Depends on what you define as elegant.
> >
> >when I was learning to program (mid 80's), we considered anything
> >outside of brut
Andrew Sackville-West wrote:
On Mon, Nov 06, 2006 at 01:34:30PM -0800, Steve Lamb wrote:
Depends on what you define as elegant.
when I was learning to program (mid 80's), we considered anything
outside of brute force to be elegant. Also, anything non-obvious was
also considered el
On Mon, Nov 06, 2006 at 04:58:18PM -0800, Steve Lamb wrote:
> Douglas Tutty wrote:
> > Sometimes its too easy to keep trying to solve the wrong problem.
>
> True, but it sure does answer the question "How do you keep a programmer
> geek busy?" :)
>
If you want to keep busy, write this in as
On Mon, Nov 06, 2006 at 01:34:30PM -0800, Steve Lamb wrote:
>
> Depends on what you define as elegant.
when I was learning to program (mid 80's), we considered anything
outside of brute force to be elegant. Also, anything non-obvious was
also considered elegant. Anything that used a side-eff
Douglas Tutty wrote:
> Sometimes its too easy to keep trying to solve the wrong problem.
True, but it sure does answer the question "How do you keep a programmer
geek busy?" :)
--
Steve C. Lamb | But who decides what they dream?
PGP Key: 8B6E99C5 | And dream
With all the permutations, especially around possible hyphenations, it
starts to be easier to look at whatever is creating this hypothetical
silly hyphenated file. (note its the file thats silly, not the
hypothetical suggestion of hyphens).
Sometimes its too easy to keep trying to solve the wrong
Douglas Tutty wrote:
> After thinking about it, yes it can all go in one line. Its more
> elegant and doesn't use up memory space but its harder to read to
> understand what its doing.
Depends on what you define as elegant. I dropped Perl several years ago
in preference to Python because I f
On Sun, Nov 05, 2006 at 05:21:23PM +1100, John O'Hagan wrote:
> On Sunday 05 November 2006 16:42, John O'Hagan wrote:
> > On Sunday 05 November 2006 09:03, Ken Irving wrote:
> > > On Fri, Nov 03, 2006 at 09:56:12PM -0500, Douglas Tutty wrote:
> > > > On Fri, Nov 03, 2006 at 08:27:42PM +, michae
On Mon, Nov 06, 2006 at 07:55:02AM -0800, Andrew Sackville-West wrote:
> On Tue, Nov 07, 2006 at 01:00:34AM +1100, John O'Hagan wrote:
> > On Monday 06 November 2006 18:38, David Jardine wrote:
> > > On Mon, Nov 06, 2006 at 11:27:58AM +1100, John O'Hagan wrote:
> >
> > [...]
> >
> > > > E.g., if
On Tue, Nov 07, 2006 at 01:00:34AM +1100, John O'Hagan wrote:
> On Monday 06 November 2006 18:38, David Jardine wrote:
> > On Mon, Nov 06, 2006 at 11:27:58AM +1100, John O'Hagan wrote:
>
> [...]
>
> > > E.g., if IN contains:
> > >
> > > junk info 18 Pro
> >
> > But what if that line were:
> >
> >
On Tue, Nov 07, 2006 at 01:00:34AM +1100, John O'Hagan wrote:
> On Monday 06 November 2006 18:38, David Jardine wrote:
> > On Mon, Nov 06, 2006 at 11:27:58AM +1100, John O'Hagan wrote:
>
> [...]
>
> > > E.g., if IN contains:
> > >
> > > junk info 18 Pro
> >
> > But what if that line were:
> >
> >
On Monday 06 November 2006 18:38, David Jardine wrote:
> On Mon, Nov 06, 2006 at 11:27:58AM +1100, John O'Hagan wrote:
[...]
> > E.g., if IN contains:
> >
> > junk info 18 Pro
>
> But what if that line were:
>
> junk info 18 Pro-
>
> which seems more likely?
>
[...]
You're right; but the OP, Mi
On Mon, Nov 06, 2006 at 11:27:58AM +1100, John O'Hagan wrote:
> On Monday 06 November 2006 05:14, Andrew Sackville-West wrote:
> > On Sun, Nov 05, 2006 at 10:08:12AM -0800, Steve Lamb wrote:
> > > Andrew Sackville-West wrote:
> > > > On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
> >
On Monday 06 November 2006 02:53, Andrew Sackville-West wrote:
> On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
> > Or the whole thing could even be done with (I think!):
> >
> > #tr -d '\n' < IN | tr ' ' '\n' | grep -B1 Processor | grep -v
> > 'Processor\|--'
>
> nice.
>
I just can
On Monday 06 November 2006 05:14, Andrew Sackville-West wrote:
> On Sun, Nov 05, 2006 at 10:08:12AM -0800, Steve Lamb wrote:
> > Andrew Sackville-West wrote:
> > > On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
> > >> Or the whole thing could even be done with (I think!):
> > >>
> >
On Monday 06 November 2006 05:29, Steve Lamb wrote:
> Andrew Sackville-West wrote:
> > tr -d '\n'
> >
> > deletes the new lines
>
> Ahhh, ok. Was still going off of the previous Python examples which
> didn't delete newlines, only replaced them with spaces. Mea Culpa.
Oops again! What I mean
On Sun, Nov 05, 2006 at 10:29:42AM -0800, Steve Lamb wrote:
> Andrew Sackville-West wrote:
> > tr -d '\n'
> >
> > deletes the new lines
>
> Ahhh, ok. Was still going off of the previous Python examples which
> didn't delete newlines, only replaced them with spaces. Mea Culpa.
>
I have to
Andrew Sackville-West wrote:
> tr -d '\n'
>
> deletes the new lines
Ahhh, ok. Was still going off of the previous Python examples which
didn't delete newlines, only replaced them with spaces. Mea Culpa.
--
Steve C. Lamb | But who decides what they dream?
PGP Key:
On Sun, Nov 05, 2006 at 10:08:12AM -0800, Steve Lamb wrote:
> Andrew Sackville-West wrote:
> > On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
> >> Or the whole thing could even be done with (I think!):
>
> >> #tr -d '\n' < IN | tr ' ' '\n' | grep -B1 Processor | grep -v
> >> 'Proce
Andrew Sackville-West wrote:
> On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
>> Or the whole thing could even be done with (I think!):
>> #tr -d '\n' < IN | tr ' ' '\n' | grep -B1 Processor | grep -v 'Processor\|--'
> nice.
Except for one problem. Look at the OP's post and y
On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
> Or the whole thing could even be done with (I think!):
>
> #tr -d '\n' < IN | tr ' ' '\n' | grep -B1 Processor | grep -v 'Processor\|--'
>
nice.
A
signature.asc
Description: Digital signature
On Sunday 05 November 2006 17:21, John O'Hagan wrote:
> On Sunday 05 November 2006 16:42, John O'Hagan wrote:
> > On Sunday 05 November 2006 09:03, Ken Irving wrote:
> > > On Fri, Nov 03, 2006 at 09:56:12PM -0500, Douglas Tutty wrote:
> > > > On Fri, Nov 03, 2006 at 08:27:42PM +, michael wrote:
On Sunday 05 November 2006 16:42, John O'Hagan wrote:
> On Sunday 05 November 2006 09:03, Ken Irving wrote:
> > On Fri, Nov 03, 2006 at 09:56:12PM -0500, Douglas Tutty wrote:
> > > On Fri, Nov 03, 2006 at 08:27:42PM +, michael wrote:
>
> [...]
>
> > > > eg for
> > > >
> > > > junk info 18 Pro
>
On Sunday 05 November 2006 09:03, Ken Irving wrote:
> On Fri, Nov 03, 2006 at 09:56:12PM -0500, Douglas Tutty wrote:
> > On Fri, Nov 03, 2006 at 08:27:42PM +, michael wrote:
[...]
> > > eg for
> > >
> > > junk info 18 Pro
> > > cessor
> > >
> > > I wish to get the field '18'
[...]
> >
> > S
On Sat, Nov 04, 2006 at 01:03:14PM -0900, Ken Irving wrote:
> On Fri, Nov 03, 2006 at 09:56:12PM -0500, Douglas Tutty wrote:
> > On Fri, Nov 03, 2006 at 08:27:42PM +, michael wrote:
> > > I've been trying to do this with 'awk' but am hitting probs (not used
> > > awk for ages!) so all offers we
1 - 100 of 190 matches
Mail list logo