10-03-04 02:12 AM
Bruce Barnett <spamhater103+U040930202111@grymoire.com> wrote in message news:<cji82o$o2t$0$
208.20.133.66@netheaven.com>...
> googlegroups.2.lmg@spamgourmet.com (Lewis Getschel) writes:
>
>
> usually this is done like
>
> if ( X"$changeservices" != X"$null" ) then
Thanks for pointing this out, I use this format in my windows batch
files, I forgot to here.
> An example input file would help.
An example file isn't needed for this code, but here is the ouput of
this code and the oldservices.txt file I'm using in the complete
version.
***** run with 2 items (no spaces) in the array -----
% ./newspost
1st part of program removed from here.
Keep these values? (Y/n)n
Cleared ALL Services! Enter the ones you want(1 per line (no
spaces)):
(The first service will be used as the dependency)
What service to add? (null value to end)win_ping
What service to add? (null value to end)win_cpu
What service to add? (null value to end)
OK, adding these services:
(win_ping win_cpu)
---------------------------------------------------------
Values that will be used:
[1] :win_ping
[2] :win_cpu
---------------------------------------------------------
Press CTRL-C to cancel, ENTER to continue
***** run with 2 items (WITH spaces) in the array -----
% ./newspost
1st part of program removed from here.
Keep these values? (Y/n)n
Cleared ALL Services! Enter the ones you want(1 per line (no
spaces)):
(The first service will be used as the dependency)
What service to add? (null value to end)win ping
What service to add? (null value to end)win cpu
What service to add? (null value to end)
OK, adding these services:
(win ping win cpu)
---------------------------------------------------------
Values that will be used:
[1] :win
[2] :ping
[3] :win
[4] :cpu
---------------------------------------------------------
Press CTRL-C to cancel, ENTER to continue
As you can see, the spaces really mess up the array. It changes from
an array with 2 items the 1st time, to one with 4 items the 2nd time.
If I use 4 items (NO spaces, rest of input clipped from here) the
ouput is:
Values that will be used:
[1] :win_ping
[2] :win_cpu
[3] :win_disk_free
[4] :win_swap_file_used
Help, Please.
the input file for the full program is simply:
% cat oldservices.txt
win_ping
win_cpu
%
[ Post a follow-up to this message ]
|