Hi
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
thanks?
On Fri, Feb 27, 2009 at 11:14:01AM +0000, Tom Brown wrote:
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
if [ "${remaining}" != "" ] ; then kill -9 ${remaining} fi
John
You don't really need to prepend the x if the $remaining is in quotes, do you? If you didn't use quotes, then you could end up with a error if $remaining isn't set.
On Feb 27, 2009, at 5:24 AM, Ralph Angenendt wrote:
Tom Brown wrote:
Hi
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
if [ "x${remaining}" != "x" ] ; then kill -9 ${remaining} fi
Ralph _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 2009-02-27 at 15:42 +0100, Ralph Angenendt wrote:
Kevin Krieser wrote:
You don't really need to prepend the x if the $remaining is in quotes, do you? If you didn't use quotes, then you could end up with a error if $remaining isn't set.
Probably. It's just something I'm used to do :)
It could be considered "good style" because it establishes a "habit" that covers for occassional "brain farts". Also helps n00bs avoid delays for debugging when they jump in and start coding under pressure.
The downside risk is that habit might bite one when they do do something like "-n" and forget to remove the "x".
<*sigh*> Habitual humons have hard hits however hard they try.
Cheers,
Ralph
<snip sig stuff>
You have to put in NOTHING, i.e.:
if [ "$remaining" = "" ] ; then ; else kill -9 $remaining fi
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
http://www.brainyquote.com/quotes/authors/m/muhammad_ali.html
http://www.brainyquote.com/quotes/authors/e/emma_goldman.html
http://www.brainyquote.com/quotes/authors/m/michelangelo.html
W. C. Fields - "I never drink water because of the disgusting things that fish do in it."
On Fri, Feb 27, 2009 at 12:14 PM, Tom Brown tom@ng23.net wrote:
Hi
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
thanks? _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
on 2-27-2009 3:32 AM � spake the following:
You have to put in NOTHING, i.e.:
if [ "$remaining" = "" ] ; then �� � � � � ; � � � �else � � � � � �kill -9 $remaining fi
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
http://www.brainyquote.com/quotes/authors/m/muhammad_ali.html
http://www.brainyquote.com/quotes/authors/e/emma_goldman.html
http://www.brainyquote.com/quotes/authors/m/michelangelo.html
W. C. Fields �- "I never drink water because of the disgusting things that fish do in it."
On Fri, Feb 27, 2009 at 12:14 PM, Tom Brown <tom@ng23.net mailto:tom@ng23.net> wrote:
Hi Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING? if [ "$remaining" = "" ] ; then � � � � � �SOMETHING ; � � � �else � � � � � �kill -9 $remaining fi
Why do you top post when you have a signature that denounces it as evil?
This is not to start a war about top posting, it is just a post about hypocrisies, which is even less tolerable.
I normally do it this way: if (length($remaining) == 0) { &do_exit; }
Per
Hi
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
Hi
My problem is related to clientless authentication for printing. We are evaluating if it's worth the trouble on centos. Uppgrading cups is not a problem That i have already solved. Further research also states that kerberos have to be version 1.6.3. This is a big problem. Neither centos 4 nor centos 5 have the required version of kerberos. Compiling my own compile kerberos is not something i want to do!
Is it worth it or even possible to upgrade kerberos to 1.6.3 or will we most likely break something else with an upgrade?? No rpms are available and i suppose there's a reason for that. There's no problem compiling cups or kerberos on both platforms. I just wanna find out if it is worth the trouble we will get or if it's possible/recommended to do it?!?!.
Best Regards, Thomas
References;;; From cups web page....
Using Kerberos Authentication CUPS 1.3 adds Kerberos support which allows you to use a Key Distribution Center (KDC) for authentication on your local CUPS server and when printing to a remote authenticated queue. This document describes how to configure CUPS to use Kerberos authentication and provides helpful links to the MIT help pages for configuring Kerberos on your systems and network.
http://www.cups.org/documentation.php/kerberos.html System Requirements The following are required to use Kerberos with CUPS: Heimdal Kerberos (any version) or MIT Kerberos (1.6.3 or newer)
On Fri, Feb 27, 2009 at 5:03 AM, Thomas Johansson thomasj@isy.liu.se wrote:
Hi
My problem is related to clientless authentication for printing. We are evaluating if it's worth the trouble on centos. Uppgrading cups is not a problem That i have already solved. Further research also states that kerberos have to be version 1.6.3. This is a big problem. Neither centos 4 nor centos 5 have the required version of kerberos. Compiling my own compile kerberos is not something i want to do!
Is it worth it or even possible to upgrade kerberos to 1.6.3 or will we most likely break something else with an upgrade?? No rpms are available and i suppose there's a reason for that. There's no problem compiling cups or kerberos on both platforms. I just wanna find out if it is worth the trouble we will get or if it's possible/recommended to do it?!?!.
Upgrading kerberos on CentOS systems is not a trivial task. Kerberos is a basic component for a lot of packages which requires a large dependency chain. I would look at it as follows:
1) CentOS-4/5 do not have kerberos needed. 2) Fedora-10/11 does have the kerberos needed. 3) CentOS-6 might be based off of Fedora-11.
Build your proof of concept project with Fedora-10 with a plan of rebuilding the system after CentOS-6 comes out. Then you have both an immediate win and a long term plan on how to reach a stable product.
Hope that helps.
Best Regards, Thomas
References;;; From cups web page....
Using Kerberos Authentication CUPS 1.3 adds Kerberos support which allows you to use a Key Distribution Center (KDC) for authentication on your local CUPS server and when printing to a remote authenticated queue. This document describes how to configure CUPS to use Kerberos authentication and provides helpful links to the MIT help pages for configuring Kerberos on your systems and network.
http://www.cups.org/documentation.php/kerberos.html System Requirements The following are required to use Kerberos with CUPS: Heimdal Kerberos (any version) or MIT Kerberos (1.6.3 or newer)
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Stephen John Smoogen wrote:
On Fri, Feb 27, 2009 at 5:03 AM, Thomas Johansson thomasj@isy.liu.se wrote:
Hi
My problem is related to clientless authentication for printing. We are evaluating if it's worth the trouble on centos. Uppgrading cups is not a problem That i have already solved. Further research also states that kerberos have to be version 1.6.3. This is a big problem. Neither centos 4 nor centos 5 have the required version of kerberos. Compiling my own compile kerberos is not something i want to do!
Is it worth it or even possible to upgrade kerberos to 1.6.3 or will we most likely break something else with an upgrade?? No rpms are available and i suppose there's a reason for that. There's no problem compiling cups or kerberos on both platforms. I just wanna find out if it is worth the trouble we will get or if it's possible/recommended to do it?!?!.
Upgrading kerberos on CentOS systems is not a trivial task. Kerberos is a basic component for a lot of packages which requires a large dependency chain.
We noticed that. Several pages of dependencies if one make a yum remove of krb5-workstation. I'm really dont want to try upgrading. Its more like i'm looking for arguments against such a crazy thing.
I would look at it as follows:
- CentOS-4/5 do not have kerberos needed.
- Fedora-10/11 does have the kerberos needed.
- CentOS-6 might be based off of Fedora-11.
Build your proof of concept project with Fedora-10 with a plan of rebuilding the system after CentOS-6 comes out. Then you have both an immediate win and a long term plan on how to reach a stable product.
Hope that helps.
We have figured it out that far. On platforms like Solaris, ubuntu Fedora and others we have no problem printing. The problem is that we have a lot of software that require both centos 5 and centos 4. Cannot abandon centos for those clients. Also, the print project is a solution offered/pushed to us. Obviously we cannot use it on centos. They (the project leaders) have to choose another solution for centos. That will be the answer to the project leaders.
Thanks for the answer
On Fri, Feb 27, 2009 at 12:27 PM, Thomas Johansson thomasj@isy.liu.se wrote:
Stephen John Smoogen wrote:
On Fri, Feb 27, 2009 at 5:03 AM, Thomas Johansson thomasj@isy.liu.se wrote:
Hi
My problem is related to clientless authentication for printing. We are evaluating if it's worth the trouble on centos. Uppgrading cups is not a problem That i have already solved. Further research also states that kerberos have to be version 1.6.3. This is a big problem. Neither centos 4 nor centos 5 have the required version of kerberos. Compiling my own compile kerberos is not something i want to do!
Is it worth it or even possible to upgrade kerberos to 1.6.3 or will we most likely break something else with an upgrade?? No rpms are available and i suppose there's a reason for that. There's no problem compiling cups or kerberos on both platforms. I just wanna find out if it is worth the trouble we will get or if it's possible/recommended to do it?!?!.
Upgrading kerberos on CentOS systems is not a trivial task. Kerberos is a basic component for a lot of packages which requires a large dependency chain.
We noticed that. Several pages of dependencies if one make a yum remove of krb5-workstation. I'm really dont want to try upgrading. Its more like i'm looking for arguments against such a crazy thing.
I would look at it as follows:
- CentOS-4/5 do not have kerberos needed.
- Fedora-10/11 does have the kerberos needed.
- CentOS-6 might be based off of Fedora-11.
Build your proof of concept project with Fedora-10 with a plan of rebuilding the system after CentOS-6 comes out. Then you have both an immediate win and a long term plan on how to reach a stable product.
Hope that helps.
We have figured it out that far. On platforms like Solaris, ubuntu Fedora and others we have no problem printing. The problem is that we have a lot of software that require both centos 5 and centos 4. Cannot abandon centos for those clients. Also, the print project is a solution offered/pushed to us. Obviously we cannot use it on centos. They (the project leaders) have to choose another solution for centos. That will be the answer to the project leaders.
A last set would be to have a seperate set of kerberos Libraries and statically compile the cups you want against those. Its an ugly hack but works in those cases.
Stephen John Smoogen wrote:
On Fri, Feb 27, 2009 at 12:27 PM, Thomas Johansson thomasj@isy.liu.se wrote:
Stephen John Smoogen wrote:
On Fri, Feb 27, 2009 at 5:03 AM, Thomas Johansson thomasj@isy.liu.se wrote:
Hi
My problem is related to clientless authentication for printing. We are evaluating if it's worth the trouble on centos. Uppgrading cups is not a problem That i have already solved. Further research also states that kerberos have to be version 1.6.3. This is a big problem. Neither centos 4 nor centos 5 have the required version of kerberos. Compiling my own compile kerberos is not something i want to do!
Is it worth it or even possible to upgrade kerberos to 1.6.3 or will we most likely break something else with an upgrade?? No rpms are available and i suppose there's a reason for that. There's no problem compiling cups or kerberos on both platforms. I just wanna find out if it is worth the trouble we will get or if it's possible/recommended to do it?!?!.
Upgrading kerberos on CentOS systems is not a trivial task. Kerberos is a basic component for a lot of packages which requires a large dependency chain.
We noticed that. Several pages of dependencies if one make a yum remove of krb5-workstation. I'm really dont want to try upgrading. Its more like i'm looking for arguments against such a crazy thing.
I would look at it as follows:
- CentOS-4/5 do not have kerberos needed.
- Fedora-10/11 does have the kerberos needed.
- CentOS-6 might be based off of Fedora-11.
Build your proof of concept project with Fedora-10 with a plan of rebuilding the system after CentOS-6 comes out. Then you have both an immediate win and a long term plan on how to reach a stable product.
Hope that helps.
We have figured it out that far. On platforms like Solaris, ubuntu Fedora and others we have no problem printing. The problem is that we have a lot of software that require both centos 5 and centos 4. Cannot abandon centos for those clients. Also, the print project is a solution offered/pushed to us. Obviously we cannot use it on centos. They (the project leaders) have to choose another solution for centos. That will be the answer to the project leaders.
A last set would be to have a seperate set of kerberos Libraries and statically compile the cups you want against those. Its an ugly hack but works in those cases.
Excellent tip! We completely missed that. Have now compiled and tested this on one client. It works!
Thanks a lot!
Now to the formalities.. My apoligies for kidnapping a thread! A mistake that will not happen again..
On Fri, 2009-02-27 at 11:14 +0000, Tom Brown wrote:
Hi
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
if [ -n "$remaining" ] ; then kill -9 $remaining fi
Man bash, look for builtin "test" and find a bunch of tests defined there. Keep in mind that "test" and "if [ ... ]" are equivalent in bash.
I don't know how much other code surround this, but I deduce (admittedly incomplete information) that you have a reducing list operation going? If so, maybe something like
# Initialize remaing list and then set "$remaining" # If empty $1 is null while [ -n "$1" ] ; do echo "$1" # remove this kill -9 $ shift done
$ remaining="9997 9998 9999" $ while [ -n "$1" ] ; do
echo "$1" shift done
9997 9998 9999
thanks?
<snip sig stuff>
HTH
<snip>
# Initialize remaing list and then set "$remaining" # If empty $1 is null while [ -n "$1" ] ; do echo "$1" # remove this kill -9 $
s/$/$1/ # OOPS!
shift done
$ remaining="9997 9998 9999" $ while [ -n "$1" ] ; do
echo "$1" shift done
9997 9998 9999
thanks?
<snip sig stuff>
HTH
On Fri, Feb 27, 2009 at 11:14:01AM +0000, Tom Brown wrote:
Hi
Below if $remaining is empty i want the if to finish - what is it i need to put in SOMETHING?
if [ "$remaining" = "" ] ; then SOMETHING ; else kill -9 $remaining fi
A ":" on it's own will do what you want.
if [ "$remaining" = "" ] then : else kill -9 $remaining fi
But better would be
if [ -n "$remaining" ] then kill -9 $remaining fi