用戶從「last」命令中選擇要切割的行以及要切割的列 。除了使用變量之外,使用'tr'到 修復了空白的所有差異。我嘗試了下面的代碼,但不知道我錯在哪裏。使用last和tr切割行和列
echo -n "What rows and columns would you like to cut: "
read before
read after
read stop
read start
last | head -n $before friend_list | tail -n $after | tr -d $start $stop
你期待什麼輸出? – 2013-03-04 23:18:26
來自一組特定行的列表。 – user2133534 2013-03-04 23:38:30
您能給出一個您開始的文本(來自'last')的例子,用戶可能給出的參數以及他們期望的結果嗎? – 2013-03-04 23:45:28