virtualbox – How to change UUID in virtual box

The following worked for me:

  1. run VBoxManage internalcommands sethduuid “VDI/VMDK file” twice (the first time is just to conveniently generate an UUID, you could use any other UUID generation method instead)
  2. open the .vbox file in a text editor
  3. replace the UUID found in Machine uuid=”{…}” with the UUID you got when you ran sethduuid the first time
  4. replace the UUID found in HardDisk uuid=”{…}” and in Image uuid=”{}” (towards the end) with the UUID you got when you ran sethduuid the second time

Source: virtualbox – How to change UUID in virtual box – Stack Overflow

virtualbox – How to change UUID in virtual box was last modified: February 3rd, 2019 by Jovan Stosic

Echo newline in Bash prints literal \n

This could better be done as

x=”\n”
echo -ne $x

-e option will interpret backslahes for the escape sequence
-n option will remove the trailing newline in the output

PS: the command echo has an effect of always including a trailing newline in the output so -n is required to turn that thing off (and make it less confusing)

This could better be done as x=”\n” echo -ne $x -e option will interpret backslahes for the escape sequence -n option will remove the trailing newline in the output PS: the command echo has an effect of always including a trailing newline in the output so -n is required to turn that thing off (and make it less confusing)

Source: Echo newline in Bash prints literal \n – Stack Overflow

Echo newline in Bash prints literal \n was last modified: February 2nd, 2019 by Jovan Stosic

read Man Page – Linux

ead

Read one line from the standard input, (or from a file) and assign the word(s) to variable name(s).

Syntax
read [-ers] [-a aname] [-p prompt] [-t timeout] [-n nchars] [-d delim] [name…]

Key
-a aname
The words are assigned to sequential indices of the array variable aname, starting at 0.
aname is unset before any new values are assigned. Other name arguments are ignored.

-d delim
The first character of delim is used to terminate the input line, rather than newline.

-e If the standard input is coming from a terminal, readline is used to obtain the line.

-n nchars
read returns after reading nchars characters rather than waiting for a complete line of
input.
-p prompt
Display prompt on standard error, without a trailing newline, before attempting to read
any input. The prompt is displayed only if input is coming from a terminal.

-r Backslash does not act as an escape character. The backslash is considered to be part
of the line. In particular, a backslash-newline pair can not be used as a line continuation.

-s Silent mode. If input is coming from a terminal, characters are not echoed.

-t timeout
Cause read to time out and return failure if a complete line of input is not read
within timeout seconds. This option has no effect if read is not reading input from
the terminal or a pipe.

-u fd Read input from file descriptor fd.

This is a BASH shell builtin, to display your local syntax from the bash prompt type: help [r]ead

One line is read from the standard input, and the first word is assigned to the first name, the second word to the second name, and so on, with leftover words and their intervening separators assigned to the last name.

If there are fewer words read from the standard input than names, the remaining names are assigned empty values.

The characters in the value of the IFS variable are used to split the line into words.

The backslash character `\’ can be used to remove any special meaning for the next character read and for line continuation.

If no names are supplied, the line read is assigned to the variable REPLY. The return code is zero, unless end-of-file is encountered or read times out.

Examples

#!/bin/bash
read var_year
echo “The year is: $var_year”

echo -n “Enter your name and press [ENTER]: ”
read var_name
echo “Your name is: $var_name”

Source: read Man Page – Linux – SS64.com

read Man Page – Linux was last modified: February 2nd, 2019 by Jovan Stosic

terminal + ssh doesn’t display UTF correctly – Ask Ubuntu

I have a remote server, to which I connect via SSH.

On separate Mac OS and Gentoo computers, when I connect to this server, unicode works fine. On my brand new Ubuntu installation, I don’t see unicode on this server correctly and I can’t seem to insert them correctly either.

I have a file with a letter “ž”. When I less it locally, on Ubuntu, in Terminal, I see correct “ž”. When I less the same file on the aforementioned server via SSH, I see just – both in Terminal and xterm.

locale on the server shows me this

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=cs_CZ.UTF-8
LC_TIME=cs_CZ.UTF-8
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=cs_CZ.UTF-8
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=cs_CZ.UTF-8
LC_NAME=cs_CZ.UTF-8
LC_ADDRESS=cs_CZ.UTF-8
LC_TELEPHONE=cs_CZ.UTF-8
LC_MEASUREMENT=cs_CZ.UTF-8
LC_IDENTIFICATION=cs_CZ.UTF-8
LC_ALL=

Terminal has UTF8 encoding (and as I wrote, the unicode file is opened correctly when opened locally).

What can be wrong?
ssh gnome-terminal unicode
shareimprove this question
asked Feb 17 ’14 at 0:28
Karel Bílek
79431023
add a comment
1 Answer
active
oldest
votes
9

This answer to a similar question helped

https://askubuntu.com/a/144448/9685

Commenting out SendEnv LANG LC_* in the local /etc/ssh/ssh_config file fixed everything.
shareimprove this answer
edited Apr 13 ’17 at 12:25
Community♦
1
answered Feb 17 ’14 at 0:37
Karel Bílek
79431023

add a comment
 

Source: terminal + ssh doesn’t display UTF correctly – Ask Ubuntu

terminal + ssh doesn’t display UTF correctly – Ask Ubuntu was last modified: February 2nd, 2019 by Jovan Stosic