echo "scan 'shortUrl',{COLUMN=>['su:customerId','su:postId']}" | ./hbase shell > myText
将Hbase表数据输出到文件中
awk '{print $1,substr($4,7)}' myText | awk '{if (NR%2==0){print " "$2} else {printf $0}}' > myText2
将mytext文件数据输出到mytext2中
表示将每两行的数据输出到一行。
echo "scan 'shortUrl',{COLUMN=>['su:customerId','su:postId']}" | ./hbase shell > myText
将Hbase表数据输出到文件中
awk '{print $1,substr($4,7)}' myText | awk '{if (NR%2==0){print " "$2} else {printf $0}}' > myText2
将mytext文件数据输出到mytext2中
表示将每两行的数据输出到一行。