PowerShell echo換行\n

加入-e參數即可。
 

加入參數 -e 

echo -e "this is sample \n for you."

輸出:

this is sample
for you.

如未加-e 則會直接顯示

this is sample \n for you.

其他參數說明

-e     enable interpretation of backslash escapes
-E     disable interpretation of backslash escapes (default)

\\     backslash
\a     alert (BEL)
\b     backspace
\c     suppress trailing newline
\f     form feed
\n     new line
\r     carriage return
\t     horizontal tab
\v     vertical tab

 


參考資料:https://blog.csdn.net/jibing57/java/article/details/7476167


人生美好~別浪費腦容量記程式碼 :- ) 

作者:CYL
出處:http://dotblogs.com.tw/cylcode
資料來源都會特別註明,有興趣都可查詢原出處,本站皆經過整理才分享,如有轉載請顯示出處及作者,感謝。