Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: awk and ksh question - solved
-----Original Message-----
awk and ksh are both interpreting $1.
Not possible. One or the other will see "$1", but not both. That's the problem with using quotes instead of assigning things to awk variables -- It makes reading the stuff confusing.
FWIW, here is what I do:
## See if there is anything to send
COUNT=`awk '/^$/ {next}; END {print NR}' "$PAGE_FILE"`
## If so send it
if [ $COUNT -gt 0 ]; then
PAGER_PERSON='' cat "${ADMIN_DIR}/who_to_page" | while read LINE; do PAGER_PERSON="${PAGER_PERSON},${LINE}" done ## Optional cleanup lines for the intractably paranoid PAGER_PERSON=`echo "$PAGER_PERSON" | sed 's/[ ]*//g'` PAGER_PERSON=`echo "$PAGER_PERSON" | sed 's/^,*//g'` PAGER_PERSON=`echo "$PAGER_PERSON" | sed 's/,,*/,/g'` if [ -n "$PAGER_PERSON" ]; then mailx -s "IT IS ALL OVER THE WALLS" "$PAGER_PERSON" < "$PAGE_FILE" fi
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Feb 04 2003 - 08:49:55 CST
![]() |
![]() |