-bash: export: `=’: not a valid identifier

You cannot put spaces around the = sign when you do: Remove the spaces you have and you should be good to go. If you type: the shell will interpret that as a request to export three names: foo, = and bar. = isn’t a valid variable name, so the command fails. The variable name, equals sign and it’s value must not be … Read more

Binary Data Posting with curl

You don’t need –header “Content-Length: $LENGTH”. curl –request POST –data-binary “@template_entry.xml” $URL Note that GET request does not support content body widely. Also remember that POST request have 2 different coding schema. This is first form: $ nc -l -p 6666 & $ curl –request POST –data-binary “@README” http://localhost:6666 POST / HTTP/1.1 User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o … Read more

Is there a “goto” statement in bash?

No, there is not; see §3.2.4 “Compound Commands” in the Bash Reference Manual for information about the control structures that do exist. In particular, note the mention of break and continue, which aren’t as flexible as goto, but are more flexible in Bash than in some languages, and may help you achieve what you want. … Read more

How to convert a string to lower case in Bash?

The are various ways: POSIX standard tr AWK Non-POSIX You may run into portability issues with the following examples: Bash 4.0 sed Perl Bash Note: YMMV on this one. Doesn’t work for me (GNU bash version 4.2.46 and 4.0.33 (and same behaviour 2.05b.0 but nocasematch is not implemented)) even with using shopt -u nocasematch;. Unsetting that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)