Write a shell script felt

1. grep 时  Binary file (standard input) matches

Plus -a solve

v_rowline_319=`cat ${v_logfile}_319 | grep -a "totalLine:" | awk -F ':' '{print $8}' | awk 'END {print}'`

2. shell -eq and = difference

for INTEGER type comparison.

    INTEGER1 is equal to INTEGER2

Apply as compared to the STRING type, but also for INTEGER type comparison.
    at The strings are equal is
    at The strings are not equal is
Integer1 -eq Integer2
    Integer1 IS equal is to Integer2

3. A few days did not write HSQL, Shousheng. Write a SQL, resulting in a hive window A result is correct, the result when the hive -e "$ sql" to get the B. And A! = B

hive >

The reason: hive -e peripheral has double quotes, the internal sub-query should use single quotes. Not common, there have been people bad positioning


Published 131 original articles · won praise 79 · views 310 000 +

Guess you like

Origin blog.csdn.net/qq_31780525/article/details/103353966