Escaping in shells

First things first: A string with spaces is enclosed in either single quotes ‘ or double quotes “. The difference you ask? Single quotes are treated “as is”: No variable replacement, no parsing, just a string. If you want to embed a variable value, you have to concatenate the string. Period. Double quotes allow dynamic… Continue reading Escaping in shells

Unify line endings

Let’s assume you have a software project and the line endings of the files are inconsistent. Meaning, that git commits and pushes without proper configuration will result in a merge disaster because the merge tools recognize the whole file as changed and not just the lines actually changed. When working on Windows or on a… Continue reading Unify line endings

Archive, compress and send

You want to archive (tar), compress (gzip) and send (scp) a directory in one command? With Linux, it is possible: What does it do? tar cf – yourdir creates a uncompressed archive and writes it to standard out (stdout). gzip -9 -c reads from standard in (stdin), compresses and writes to standard out. ssh -l… Continue reading Archive, compress and send

Send passwords more secure

Sometimes it is inevitable to send passwords and credentials to a counterpart who needs access to some kind of management tool because there is not extended and secure user management available. I always just sent the credentials with the login link. Now imagine what this means: A potential scanner or crawler could find my the… Continue reading Send passwords more secure