That depends on how the cgi script reads its data. If it uses GET, you just pass the arguments on the command line using spaces to separate them (as opposed to the "?"'s you would use if coding from a web page).
If it's POST, you set and export the environment variable CONTENT_LENGTH and then feed your data to the standard input of the process; like this in shell:
export CONTENT_LENGTH=5; echo "12345" | cgi_script
Of course "12345" is probably not what the cgi script expects. Generally it would be pairs of data separated by ampersands, like this
myname=tony&mycolors=red&today=Sunday
So you do need to know what the cgi script is looking for, Usually you can determine that from the web form that it ordinarily uses.
You also need to understand that certain characters (like spaces) need to be encoded. Spaces are easy: you use "+"
sentence=this+is+a+sentence&word=fred
but other things have to be translated to hex and preceded by a "%". Here's an example of multiline input:
name=Fred+Jones&address=10+Sample+street%0D%0AApt+8
Hope that gets you started at least.
Tony Lawrence
SCO Unix/Linux Resources
tony@pcunix.com