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.