의 값의 N 번호에 대한 쉼표로 분리 된 출력을 출력의 X 번호가있는 스크립트입니다 필요 :은 아래 쉘
#!/bin/bash
instant_client="/root/ora_client/instantclient_11_2"
output=`$instant_client/sqlplus -s HRUSER/[email protected] <<EOF
set heading off
set feedback off
set lines 10000
set pagesize 10000
select count (1) from onboardingcandidates o, candidatedetails c where o.candidateid=c.candidateid and o.JOININGSTATUS='0091' and to_date(o.joiningdate)=to_date(sysdate+5);
EOF
exit`
echo $output
Output:
cand1
cand2
cand3
cand62
필수 출력 :
cand1, cand2, cand3, cand62
당신이 무엇을 원하는 분명하지 않다. 귀하의 질문은 무엇인가? – Yamaneko
위의 스크립트를 실행하려고하면 다음 출력이 표시됩니다. cand1 cand2 cand3 cand62. 하지만 출력을 쉼표로 분리해야 cand1, cand2, cand3, cand62로 바꿔야합니다. – Venkatesh
아무도 없습니까? 제발 도와주세요 A.S.A.P – Venkatesh