Note that there are some explanatory texts on larger screens.

plurals
  1. POErrors on beginner bash script
    text
    copied!<p>could u help me out? I run this on cygwin as ./test.sh and I get unexpected end of file on line 51. Any thoughts?</p> <p>Thx in advance</p> <p>LAST EDIT: final version 'runnin on CygWin, the problem was with the line break, CrLf instead Lf.</p> <pre><code>#!/bin/sh ################################################## ## USAGE ################################################## if [ $# -ne 1 ]; then echo "1&gt;Use Extractor: $0 &lt;MODO DE OPERACAO&gt;" echo "2&gt;Use Extractor: $0 &lt;MODO DE OPERACAO&gt; &lt;DATA INICIAL&gt; &lt;DATA FINAL&gt;" exit 127 else if [ $1 -lt 0 ]; then if [ $1 -gt 1 ]; then echo "2&gt;Use Extractor: $0 &lt;MODO DE OPERACAO&gt; &lt;DATA INICIAL&gt; &lt;DATA FINAL&gt;" exit 127 fi fi fi ################################################## ## VARS ################################################## ########################################## ## AUX ########################################## set java_cmd="" set java_cmd_emergencial="" set java_cp="" ########################################## ## JAR ########################################## set db_user="" set db_pwd="" set conn_string="" set work_dir="" set output_dir="" ################################################## ## PARAMETROS ################################################## set mode=$1 set data_ini="" set data_fim="" if [ $# -eq 3 ]; then set data_ini = $2 set data_fim = $3 fi ################################################## ## CHAMADA DO JAR ################################################## java "$java_cp" "$java_cmd" "$mode" "$db_user" "$db_pwd" "$conn_string" "$work_dir" "$output_dir" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload