week_num=`date +%u` 就能把今天是星期幾的賦值給一個(gè)變量嗎
While very easy to type (an important factor for an interactive command processor) the backquote notation has been criticized[1] for being awkward to nest, putting one command substitution inside another, because both the left and the right delimiters are the same. To solve this problem, bash 2.0[2] and the Korn shell (ksh)[3] introduced an alternative notation, $( ... ), borrowing from the notational style used for variable substitution:
歡迎光臨 Chinaunix (http://72891.cn/) | Powered by Discuz! X3.2 |