EE_DSnP 板


LINE

请问一下: 作业1.1 第二题的(b)分成两个部份 可是如果对去掉“ Darr (nothing)”的档案做第二部份的动作 即“extract the lines from (1)” 则第一行出现的行号是 9117: Output Transition Time: -115.761 而如果对没有去掉“ Darr (nothing)”的档案做第二部份的动作 第一行出现的行号才是正确的 10002: Output Transition Time: -115.761 问过之前修资结的同学, 他们那时候的作业要求是从 Use the “grep” command to extract the lines from “hw1.1.p2.log” with the pattern “Output Transition Time” and use the command “sort” to sort them in the ascending order of the transition time. 而不是从去掉“ Darr (nothing)”的档案做排序的动作 可是结果今年的参考结果跟去年一样…… 所以请问老师,我们应该是跟去年一样用原始的“hw1.1.p2.log”去跑 出来第一行10002: Output Transition Time: -115.761 还是用去掉“ Darr (nothing)”的档案去跑 出来第一行9117: Output Transition Time: -115.761? 谢谢! --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.25.107
1F:→ djshen:会出现9117表示你是去掉Darr (nothing) 才加行号的吧 09/24 21:28
2F:→ p31415926535:所以想请问作业要求是不是要去掉那几行再加行号? 09/24 21:48
3F:推 victoret:Prefix each line of output with the original line 09/24 22:18
4F:→ victoret:number in “hw1.1.p2.log”. 09/24 22:18
5F:→ victoret:应该是先加行号吧 09/24 22:19
6F:推 ric2k1:题目有说: Prefix each line of output with the original 09/24 22:20
7F:→ ric2k1:line number in “hw1.1.p2.log”. 所以是 10002, 不是9117 09/24 22:21
8F:→ concise:Prefix each line of output with the original line 09/24 22:24
9F:→ concise:number in “hw1.1.p2.log”. 09/24 22:25
10F:推 rf0914:所以MustExist里的p2.log是要存a小题去掉Darr行的结果吗? 09/24 22:33
11F:推 ric2k1:p2.log 是原来的档案,p2b.log 是做完 2(b) 最後的结果 09/24 22:36
12F:→ ric2k1:p2a.cmd, p2b.cmd 分别是 2(a) 与 2(b) 所用到的 commands. 09/24 22:37
13F:推 ric2k1:刚刚才发现原来三楼已经 PO 过了... 眼残 XD 09/24 22:38
14F:推 rf0914:所以a小题的指令只要能够把结果输出到萤幕上就好罗?? 09/24 22:43
15F:推 victoret:个人比较想知道行号後面的冒号是怎麽出现的...弄不出来 09/24 22:57
16F:→ victoret:楼楼上问的在 #1AljW0US 有提到 09/24 23:10
17F:推 ric2k1:冒号可以 man 一下 grep 09/24 23:16
18F:→ rf0914:噢不对我的意思是关於a小题,我只需要写个指令把去掉Darr行 09/24 23:16
19F:→ rf0914:的结果输出在萤幕上,而不是直接更改原始档案,这样对吗? 09/24 23:17
20F:→ victoret:我自己是这样做啦XD 09/24 23:21
21F:推 ric2k1:对! 是输出在萤幕,不是直接改 p2.log. 然後用 | 或是 > 把 09/24 23:25
22F:→ ric2k1:结果存起来. BTW, 你是指 2(b) 的 (1) 吧!? sorry for the 09/24 23:26
23F:→ ric2k1:confusion! 09/24 23:26
24F:推 rf0914:了解~ 多谢教授~ 09/24 23:27
25F:推 victoret:喔喔原来是用 grep 不是用 nl!感谢教授! 09/24 23:37
26F:→ p31415926535:原来是是输出在萤幕,不是直接改 p2.log!谢谢教授 09/25 09:31







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Gossiping站内搜寻

TOP