Re: .sh check for sufix g or m on size field

2010-07-13 Thread Chad Perrin
On Mon, Jul 12, 2010 at 08:58:05AM -0700, Chip Camden wrote: Quoth Aiza on Monday, 12 July 2010: Sorry miss send, was not done yet. Have a .sh script that accepts an -s sparse file size. Only 2 suffix's are valid m and g. Been trying to get this line of code to strip out just the

Re: .sh check for sufix g or m on size field

2010-07-13 Thread Chad Perrin
On Tue, Jul 13, 2010 at 08:59:54AM +0800, Aiza wrote: This is real close but it allows a numeric value through as valid which is not a valid condition. The $size value has to be suffixed with g or m to be valid. A numeric value only or a numeric value suffixed with anything else than m or

.sh check for sufix g or m on size field

2010-07-12 Thread Aiza
Have a .sh script that accepts an -s sparse file size Only 2 suffix's are valid m and g. Been trying to get this line of code to just strip out just the single letter. But it strips the letter and every thing to the right of it. Timagesize=`echo-n ${imagesize} | sed 's/g.*$//'` I plan to

.sh check for sufix g or m on size field

2010-07-12 Thread Aiza
Sorry miss send, was not done yet. Have a .sh script that accepts an -s sparse file size. Only 2 suffix's are valid m and g. Been trying to get this line of code to strip out just the single letter. But it strips the letter and every thing to the right of it. Timagesize=`echo-n ${imagesize}

Re: .sh check for sufix g or m on size field

2010-07-12 Thread Anonymous
Aiza aiz...@comclark.com writes: Have a .sh script that accepts an -s sparse file size. Only 2 suffix's are valid m and g. Been trying to get this line of code to strip out just the single letter. But it strips the letter and every thing to the right of it. Timagesize=`echo-n ${imagesize}

Re: .sh check for sufix g or m on size field

2010-07-12 Thread John Webster
--On July 12, 2010 10:29:08 PM +0800 Aiza aiz...@comclark.com wrote: Sorry miss send, was not done yet. Have a .sh script that accepts an -s sparse file size. Only 2 suffix's are valid m and g. Been trying to get this line of code to strip out just the single letter. But it strips the

Re: .sh check for sufix g or m on size field

2010-07-12 Thread Chip Camden
Quoth Aiza on Monday, 12 July 2010: Sorry miss send, was not done yet. Have a .sh script that accepts an -s sparse file size. Only 2 suffix's are valid m and g. Been trying to get this line of code to strip out just the single letter. But it strips the letter and every thing to the right

Re: .sh check for sufix g or m on size field

2010-07-12 Thread Aiza
Anonymous wrote: Aiza aiz...@comclark.com writes: Have a .sh script that accepts an -s sparse file size. Only 2 suffix's are valid m and g. Been trying to get this line of code to strip out just the single letter. But it strips the letter and every thing to the right of it.