AnsweredAssumed Answered

Simple Shell Script ... not working ... but why?

Question asked by wxtyrs on Oct 14, 2018
Latest reply on Oct 14, 2018 by wxtyrs

The following Shell Script executes fine using OSX terminal.

 

It does not execute at all within FMPA 16 using the latest "BBox Bash" interpreter.

 

On the other hand, running awk via the BBox interpreter works fine to parse hundreds of text files.

 

I am new to shell scripting via FMP ...

 

What am I missing ??

 

Thanks!!

 

echo -e '__≈CLAIMUID\t§≈PROVIDER OSCAR NUMBER\t§≈BENEFICIARY HICN\t∆≈CLAIM TYPE CODE\t∞≈CLAIM FROM DATE\t∞≈CLAIM THRU DATE\t∆≈CLAIM BILL FACILITY TYPE CODE\t∆≈CLAIM BILL CLASSIFICATION CODE\t∆≈DIAGNOSISPRINCIPAL CODE\t∆≈DIAGNOSISADMITTING CODE\t∆≈CLAIM MEDICARE NON-PAYMENT REASON CODE\t≈CLAIM PAYMENT AMOUNT\t∆≈CLAIM NCH PRIMARY PAYER CODE\t∆≈FED INFORMATION PROCESSING STANDARDS (FIPS) STATE CODE\t∆≈BENEFICIARY PATIENT STATUS CODE\t∆≈DIAGNOSIS RELATED GROUP CODE\t∆≈CLAIM OUTPATIENT SERVICE TYPE CODE\t§≈FACILITY PROVIDER NPI NUMBER\t§≈OPERATING PROVIDER NPI NUMBER\t§≈ATTENDING PROVIDER NPI\t§≈OTHER PROVIDER NPI NUMBER\t∆≈CLAIM ADJUSTMENT TYPE CODE\t∞≈CLAIM EFFECTIVE DATE\t∞≈CLAIM IDR LOAD DATE\t§≈BENEFICIARY EQUITABLE BIC HIC NUMBER\t∆≈CLAIM ADMISSION TYPE CODE\t∆≈CLAIM ADMISSION SOURCE CODE\t∆≈CLAIM BILL FREQUENCY CODE\t∆≈CLAIM QUERY CODE\t§≈BENEFICIARY SURROGATE KEY\t§≈ESCO IDENTIFIER\t_≈CLAIMPERIODNUMBER\t∞≈META PROCESS DATE' | cat - /Users/XXX/z.tempFMP/TEST.txt > tempecho && mv tempecho /Users/XXX/z.tempFMP/TEST.txt

 

The above script inserts a tab-delimited header at the first line of an existing text file.

Outcomes