svn status | sort
不排序输出.
你知道为什么吗?
例如:
$svn status ? IDrd? core.7319? difftest? core.29328A + rf_common/ext_API.savD rf_common/ext_API/firewall_defs.hD rf_common/ext_API/rf_macro.h? firewall/src/hash2tuple.cpp.sav! firewall/src/hash2tuple.cppM main.cppM makefile$svn status | sortA + rf_common/ext_API.sav? core.29328? core.7319? difftestD rf_common/ext_APID rf_common/ext_API/firewall_defs.hD rf_common/ext_API/rf_macro.h! firewall/src/hash2tuple.cpp? firewall/src/hash2tuple.cpp.sav? IDrdM main.cppM makefile
例如,问号没有排序.
解决方法 您似乎希望排序禁用最后的比较.话
sort -s -k1,1
你的输入会产生:
! firewall/src/hash2tuple.cpp? IDrd? core.7319? difftest? core.29328? firewall/src/hash2tuple.cpp.savA + rf_common/ext_API.savD rf_common/ext_API/firewall_defs.hD rf_common/ext_API/rf_macro.hM main.cppM makefile
引用男人排序:
-s,--stable stabilize sort by disabling last-resort comparison
从sort invocation开始:
总结Finally,as a last resort when all keys compare equal,sort compares
entire lines as if no ordering options other than--reverse (-r)
were specifIEd. The--stable (-s)
option disables this last-resort comparison so that lines in which all fIElds compare equal are left in their original relative order.
以上是内存溢出为你收集整理的linux – svn status | sort – 不对输出进行排序全部内容,希望文章能够帮你解决linux – svn status | sort – 不对输出进行排序所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)