Surfing through logs with less

shift g: goes to end.
shift f: tails the file.

  – ctrl+c: switch to normal mode (no tails)

?: search upwards
/: search downward
 – n: search next match in current direction
 – shift n: search next match in counter direction
Also useful to find 2 or more words in one line is the regex:
Word1.+Word2 finds both words in the same line
As an extra to review logs, it is also useful the command grep with options after and before:
grep -A: lines after match
grep -B: lines before match

Run nano on docker ubuntu image

I have tried to run nano on an ubuntu docker image and after installing it I always have this error:
Error opening terminal: unknown.

The solution is so easy as to run into the docker image export TERM=xterm

Problem is that it does not survive the restart, as in any bash session actually. I will try to add it on the Dockerfile but why that the term is set on the run command I am not very optimistic with it.

I have tried to run nano on an ubuntu docker image and after installing it I always have this error:
Error opening terminal: unknown.

The solution is so easy as to run into the docker image export TERM=xterm

Use multiple parameters with jjs in linux shebang script

If you try to use multiple parameters in the script on a linux OS like this,
#!/usr/bin/jjs -strict -scripting -fv

you will see something like this:
"-strict -scripting -fv" is not a recognized option. Use “-h” or “-help” to see a list of all supported options.

That happens because the linux interpreter is using all the parameters as a unique parameter.
The workaround is to use the *-J-Dnashorn.args* like

#!/usr/bin/jjs -J-Dnashorn.args= -strict -scripting -fv

If you try to use multiple parameters in the script on a linux OS like this,

#!/usr/bin/jjs -strict -scripting -fv

you will see something like this:

"-strict -scripting -fv" is not a recognized option. Use "-h" or "-help" to see a list of all supported options.

That happens because the linux interpreter is using all the parameters as a unique parameter.
The work around is to use the -J-Dnashorn.args like
#!/usr/bin/jjs -J-Dnashorn.args= -strict -scripting -fv
and it will work like a breeze.