What is $@ in Bash?

I reckon that the handle $@ in a shell script is an array of all arguments given to the script. Is this true? I ask because I normally use search engines to gather information, but I can’t google for $@ and I have grown too accustomed to easily getting served everything.

How to run Conda?

It turns out that I had not set the path. To do so, I first had to edit .bash_profile (I downloaded it to my local desktop to do that, I do not know how to text edit a file from linux) Then add this to .bash_profile:

Pass a password to ssh in pure bash

Since there were no exact answers to my question, I made some investigation why my code doesn’t work when there are other solutions that works, and decided to post what I found to complete the subject.As it turns out: “ssh uses direct TTY access to make sure that the password is indeed issued by an … Read more

How to split a string into an array in Bash?

Note that the characters in $IFS are treated individually as separators so that in this case fields may be separated by either a comma or a space rather than the sequence of the two characters. Interestingly though, empty fields aren’t created when comma-space appears in the input because the space is treated specially. To access an individual element: To … Read more

Passing parameters to a Bash function

There are two typical ways of declaring a function. I prefer the second approach. or To call a function with arguments: The function refers to passed arguments by their position (not by name), that is $1, $2, and so forth. $0 is the name of the script itself. Example: Also, you need to call your function after it is declared. Output: … Read more

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