Facing issue with sort command while executing script using ksh
Issue
- Getting 'sort' error when running shell script
awk -F"|" -v CHECK_FIELD="6" -v CHECK_FIELD="RTV_U_TY_Ac" '{arr[$1] +=6} END {for (i in arr) {printf (SUMMATION_FIELD_NAME1"|%1s|%2.2f\n", i, arr[i]) }}' /opt/test/data/check.dat | sort -n -k 0 >> /opt/test/data/check_23
"sort: field number is zero: invalid field specification `0'"
- Executing a custom script works with
bash
andksh
in RHEL4 but notksh
in RHEL6 - Trying to execute script with
bash
works but when trying to execute script withksh
it is not working
Environment
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.