function definition

function definition

Post by David Ch » Fri, 13 Jun 1997 04:00:00



Hi,

I remember in shell script you can use a function which is defined later but
I don't remember the details.  Can anyone tell me about it?

Thanks.

-- David

 
 
 

function definition

Post by Kent Squire » Fri, 13 Jun 1997 04:00:00



> Hi,

> I remember in shell script you can use a function which is defined later but
> I don't remember the details.  Can anyone tell me about it?

> Thanks.

> -- Davidfrom what I've seen:

#!/bin/ksh

get_user()
{
        print $USER

Quote:}

# main

echo "Current user is $(get_user)"
echo

# EOF