小编nov*_*ce3的帖子

Shell cmd"date"到底没有新行

我想使用date命令输出一行日期,但它以"\n"结束,我不需要它,目前,我使用:

echo -n `date +"[%m-%d %H:%M:%S]"`
Run Code Online (Sandbox Code Playgroud)

要么

date +"[%m-%d %H:%M:%S]"|tr -d "\n"
Run Code Online (Sandbox Code Playgroud)

"date"是否有任何内置参数可以做到这一点?

shell newline

24
推荐指数
3
解决办法
1万
查看次数

如何在python中打印原始unicode?

我是Python的新手,所以也许我不能很好地表达它...

我有一个弦 '\xb9\xfe'

我希望它以这种方式打印'\xb9\xfe',而不是转换为汉字'?'。

正确的做法是什么?

python string unicode encode

5
推荐指数
1
解决办法
4087
查看次数

标签 统计

encode ×1

newline ×1

python ×1

shell ×1

string ×1

unicode ×1