Get part of result of command line in OS X
I would recommend using the "grep" and "awk" commands from bash.  You can use them to parse the data given in bash.  Here is example using the details you described above.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep "channel" | awk '{print $2}'


Do yourself a favor and sym link the binary to /usr/local/bin so you can just type airport (or script it)

airport -I | grep "channel" | awk '{print $2}'