Re: Stupid Bash question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aaron Konstam wrote:

On Mon, Feb 09, 2004 at 10:35:17AM -0800, joe wrote:

This is driving me crazy. How does one capture the string output of a
function in a bash shell script like:

p=getpass($1)

should do into the variable p?


This indeed was a stupid question and I apologize. The answer is
probably use Perl.


So, you didn't like our answers? what did we miss?

Joe


You didn't miss anything that I said but what I did not say. The
getpass I was talking about in this case was a C program. C main
programs do not return string values which I was trying to do here.
If getpass was a bash function your answers would be appropriate. But for a C program it just won't work.


Forgive me, but apart from the spurious spelling mistakes how does

p=$(date +%x)

differ from

p=$(getpass $1)

Unless by "C program" you don't mean a C program, you mean a C subroutine that you want to call from a C program, or indeed from Perl.

jch


-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux