Re: OT: Shell Script using Awk

2008-11-02 Thread Jonathan McKeown
On Sunday 02 November 2008 03:21:55 David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String that

Re: OT: Shell Script using Awk

2008-11-02 Thread Josh Paetzel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Allen wrote: On 11/1/08, Sahil Tandon [EMAIL PROTECTED] wrote: David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data

OT: Shell Script using Awk

2008-11-01 Thread David Allen
My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String that containing records, each delimited by a single space. I need to

Re: OT: Shell Script using Awk

2008-11-01 Thread Jeremy Chadwick
On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String

Re: OT: Shell Script using Awk

2008-11-01 Thread David Allen
On 11/1/08, Jeremy Chadwick [EMAIL PROTECTED] wrote: On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to

Re: OT: Shell Script using Awk

2008-11-01 Thread Jeremy Chadwick
On Sat, Nov 01, 2008 at 08:17:54PM -0800, David Allen wrote: On 11/1/08, Jeremy Chadwick [EMAIL PROTECTED] wrote: On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm

Re: OT: Shell Script using Awk

2008-11-01 Thread Gary Newcombe
On Sat, 1 Nov 2008 18:21:55 -0700, David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very

Re: OT: Shell Script using Awk

2008-11-01 Thread Gary Newcombe
On Sat, 1 Nov 2008 20:17:54 -0800, David Allen [EMAIL PROTECTED] wrote: On 11/1/08, Jeremy Chadwick [EMAIL PROTECTED] wrote: On Sat, Nov 01, 2008 at 06:21:55PM -0700, David Allen wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a

Re: OT: Shell Script using Awk

2008-11-01 Thread Sahil Tandon
David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I have A Very Long String that containing records,

Re: OT: Shell Script using Awk

2008-11-01 Thread David Allen
On 11/1/08, Gary Newcombe [EMAIL PROTECTED] wrote: On Sat, 1 Nov 2008 18:21:55 -0700, David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple

Re: OT: Shell Script using Awk

2008-11-01 Thread David Allen
On 11/1/08, Sahil Tandon [EMAIL PROTECTED] wrote: David Allen [EMAIL PROTECTED] wrote: My apologies for asking on this list, but I'm stuck without Perl and need to use awk to generate a report. I'm working with a large data set spread across multiple files, but to keep things simple, say I

OT: Shell script

2005-07-11 Thread Brian Henning
All, I am trying to write an SH script that i need some functionality. I want it to be able to get a filename without the extention on the end. for example. file.mp3 i would like it to return 'file'. Any ideas? Thanks, BH ___

Re: OT: Shell script

2005-07-11 Thread Philip Hallstrom
All, I am trying to write an SH script that i need some functionality. I want it to be able to get a filename without the extention on the end. for example. file.mp3 i would like it to return 'file'. Probably lots of ways. Use sed in a pipe... sed 's/\$//' -philip

Re: OT: Shell script

2005-07-11 Thread Lowell Gilbert
Brian Henning [EMAIL PROTECTED] writes: I am trying to write an SH script that i need some functionality. I want it to be able to get a filename without the extention on the end. for example. file.mp3 i would like it to return 'file'. basename(1); it's even POSIX, so it's pretty

Re: OT: Shell script

2005-07-11 Thread Gerhard Meier
On Mon, Jul 11, 2005 at 01:36:31PM -0500, Brian Henning wrote: I want it to be able to get a filename without the extention on the end. [...] file.mp3 i would like it to return 'file'. Well, I like the following solution, because it doesn't fork: FILE=file.mp3 echo ${FILE%.*} bye, Gerhard

Re: OT: Shell script

2005-07-11 Thread Philip Hallstrom
I am trying to write an SH script that i need some functionality. I want it to be able to get a filename without the extention on the end. for example. file.mp3 i would like it to return 'file'. basename(1); it's even POSIX, so it's pretty portable. But only if he knows the file extension

Re: OT: Shell script

2005-07-11 Thread Lowell Gilbert
Philip Hallstrom [EMAIL PROTECTED] writes: I am trying to write an SH script that i need some functionality. I want it to be able to get a filename without the extention on the end. for example. file.mp3 i would like it to return 'file'. basename(1); it's even POSIX, so it's

Re: OT: Shell script

2005-07-11 Thread Björn König
Brian Henning wrote: I am trying to write an SH script that i need some functionality. I want it to be able to get a filename without the extention on the end. for example. file.mp3 i would like it to return 'file'. Any ideas? This one looks ugly, but works fine: echo

OT Shell Script

2005-06-21 Thread Chris Knipe
May be a bit off topic, but I don't know any sh scripting lists that I'm subscribed to... :) If I run the script from shell / console, it runs without a problem Running it via cron, I get: [: 6: unexpected operator The script: #!/bin/sh HOSTNAME=`/usr/bin/uname -n` SIZE=`/usr/bin/du

Re: OT Shell Script

2005-06-21 Thread Alex Zbyslaw
Chris Knipe wrote: May be a bit off topic, but I don't know any sh scripting lists that I'm subscribed to... :) If I run the script from shell / console, it runs without a problem Running it via cron, I get: [: 6: unexpected operator The script: #!/bin/sh HOSTNAME=`/usr/bin/uname -n`

Re: OT Shell Script

2005-06-21 Thread Chris Knipe
Call me stupid, I wasn't aware that [ is a command... ;) Thanks, Chris. - Original Message - From: Alex Zbyslaw [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Tuesday, June 21, 2005 12:02 PM Subject: Re: OT Shell Script Chris Knipe wrote

Re: OT Shell Script

2005-06-21 Thread Alex Zbyslaw
Chris Knipe wrote: Call me stupid, I wasn't aware that [ is a command... ;) Not knowing is ignorance and all of us are ignorant about plenty of stuff. Deliberately staying ignorant is stupid, and asking questions and being interested by the answers is the opposite of that. Of course, I

Re: OT: shell script problem

2003-02-21 Thread Grzegorz Czaplinski
On Thu, Feb 20, 2003 at 03:14:22PM -0600, Brian Henning wrote: i have this script with one input file and i keep getting the error: /files_???/19980527/???/servermyname # sh doc_id.sh input.txt /files_???/19980527/???/: No such file or directory /files_???/19980527/???/ sh

OT: shell script problem

2003-02-20 Thread Brian Henning
i have this script with one input file and i keep getting the error: /files_???/19980527/???/servermyname # sh doc_id.sh input.txt /files_???/19980527/???/: No such file or directory /files_???/19980527/???/ sh doc_id.sh - #! /bin/sh -x INPUT=$1 for i in `cat $INPUT`;