找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

巢课
电巢直播8月计划
查看: 174|回复: 2
打印 上一主题 下一主题

版主sort命令怎么用

[复制链接]

97

主题

314

帖子

670

积分

三级会员(30)

Rank: 3Rank: 3Rank: 3

积分
670
跳转到指定楼层
1#
发表于 2015-3-3 10:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您!

您需要 登录 才可以下载或查看,没有帐号?注册

x
sort -n +0.3 A.txt> AA.txt什么意思啊,请版本帮忙。谢谢!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
收藏收藏 支持!支持! 反对!反对!
~

57

主题

1857

帖子

7919

积分

六级会员(60)

Rank: 6Rank: 6

积分
7919
2#
发表于 2015-3-3 11:08 | 只看该作者
本帖最后由 XYX365 于 2015-3-3 12:31 编辑

應該是在排列檔案a.txt裡面每一行由小到大之後,在另存到aa.txt檔案裡面
不知道是不是你要的答案.

以下是參數說明:
Usage: sort [OPTION]... [FILE]...
Write sorted concatenation of all FILE(s) to standard output.

  +POS1 [-POS2]    start a key at POS1, end it *before* POS2 (obsolescent)
                     field numbers and character offsets are numbered
                     starting with zero (contrast with the -k option)
  -b               ignore leading blanks in sort fields or keys
  -c               check if given files already sorted, do not sort
  -d               consider only [a-zA-Z0-9 ] characters in keys
  -f               fold lower case to upper case characters in keys
  -g               compare according to general numerical value, imply -b
  -i               consider only [\040-\0176] characters in keys
  -k POS1[,POS2]   start a key at POS1, end it *at* POS2
                     field numbers and character offsets are numbered
                     starting with one (contrast with zero-based +POS form)
  -m               merge already sorted files, do not sort
  -M               compare (unknown) < `JAN' < ... < `DEC', imply -b
  -n               compare according to string numerical value, imply -b
  -o FILE          write result on FILE instead of standard output
  -r               reverse the result of comparisons
  -s               stabilize sort by disabling last resort comparison
  -t SEP           use SEParator instead of non- to whitespace transition
  -T DIRECTORY     use DIRECTORY for temporary files, not $TMPDIR or /tmp
  -u               with -c, check for strict ordering;
                   with -m, only output the first of an equal sequence
  -z               end lines with 0 byte, not newline, for find -print0
      --help       display this help and exit
      --version    output version information and exit

POS is F[.C][OPTS], where F is the field number and C the character position
in the field, both counted from one with -k, from zero with the obsolescent
form.  OPTS is made up of one or more of Mbdfinr; this effectively disables
global -Mbdfinr settings for that key.  If no key is given, use the entire
line as the key.  With no FILE, or when FILE is -, read standard input.

点评

这个排列的功能呀  详情 回复 发表于 2015-3-3 11:26

97

主题

314

帖子

670

积分

三级会员(30)

Rank: 3Rank: 3Rank: 3

积分
670
3#
 楼主| 发表于 2015-3-3 11:26 | 只看该作者
XYX365 发表于 2015-3-3 11:08
應該是在比較檔案a.txt裡面有0.3這個數值之後,的所有資料另存到aa.txt檔案裡面
不知道是不是你要的答案.
...

这个排列的功能呀
~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

巢课

技术风云榜

关于我们|手机版|EDA365 ( 粤ICP备18020198号 )

GMT+8, 2025-2-24 00:34 , Processed in 0.054876 second(s), 32 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表