Ralph Shumaker wrote:
> James G. Sack (jim) wrote:
>
>> Ralph Shumaker wrote:
>>
>>
>>> How can I get a script file to skip a large section?
>>>
>>> Up to now, I've just been commenting out (as I go) the lines that have
>>> already done what I need them to do and don't need them to do it
>>> again. But every once in a while, I want *every* line to execute.
>>>
>>> Is it something simple like:
>>> if 1=0
>>> .
>>> .
>>> .
>>> fi
>>>
>>
>> What you've done is actually a common practice during script development.
>>
>> It might be easier to read if you put blocks of code into functions, and
>> then any one call can be disabled by a single comment-character.
>>
>>
>
> I think I may have given mixed messages. I think that "if ... fi" is
> part of certain programming languages, but I only used it as an example
> of what I want to do. I'm working in a simple shell script
> ("#!/bin/bash").
>
>
Oh, you are looking for the syntax?
Have you tried man bash <wink> ;-)
if true
then
...
fi
if false
then
...
fi
function doit(){
...
}
doit
#doit
Do these give you some ideas?
Ask again, if/as required.
Regards,
..jim
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list