Supposing some strings (like 123 or abc or test123) would automatically appear on the screen after last command and I cannot know the exact value of the string in advance.
Next I want to make a new directory named after that string (like ./123/
or ./abc/
or ./test123/
), which means the string should be given to a variable var
so that the new directory could be created by mkdir $var
.
$(...)
syntax is worth considering. There's an explanation somewhere else on ULSE that I can't find now. – Kalvin Lee Oct 24 '16 at 13:50uname -n
with the name of your random-string-generator command and you'll have what you want. – dr_ Oct 24 '16 at 13:57