LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   calling a function and passing a variable the correct way (http://www.linuxquestions.org/questions/programming-9/calling-a-function-and-passing-a-variable-the-correct-way-560088/)

ForYouAndI.com 06-07-2007 10:16 PM

calling a function and passing a variable the correct way
 
I've spent hours trying to find information on how to do this correctly and couldn't find anything useful. This is what I have so far. I'm extremely angry at this point and need a punching bag! C++ is sooooooo much more simple and makes soooo much more sense than linux shell scripting.


---------The Script-------------
filePath='afile'
md5sum $filePath
--------------------------------

Output:
ac7b99b37fdc6cce85baeb5e9148402e afile


WHY do the arguments to the function print!!!???
Am I doing something wrong?

taylor_venable 06-07-2007 10:36 PM

You're not doing anything wrong. This is the way md5sum formats its output. That way you can do "md5sum *.iso" and you will have a complete listing of each MD5 checksum and associated filename.

ForYouAndI.com 06-07-2007 10:44 PM

You're right. Thank you!


All times are GMT -5. The time now is 08:52 PM.