2021年1月23日星期六

Bash - meaning of a simple question mark (?)

I was playing around with some bash features and as I tried echo-ing some output, I noticed, that

echo what about in some more complex example ?  

results in

what about in some more complex example \

I know that escaping the question mark or the whole line with quotes resolves the problem, but I am curious of why is it happening.

So my 2 questions are:

  1. What is the meaning of a simple question mark in bash (I know for example about the '$?' special parameter and regex usage) ?
  2. I suppose that is is a bash environment variable or some king of variable. How can I inspect a variable ? For example a command can be inspected with type keyword, i.e. type cd
https://stackoverflow.com/questions/65862754/bash-meaning-of-a-simple-question-mark January 24, 2021 at 02:14AM

没有评论:

发表评论