刚刚在工作过程中碰到一个小问题,后来朋友给了提示,解决出来了!在这里分享一下
问题描述:
20180208/288235490/174_align_1.jpg 264 285 536 176 26 1 1 1 1
20180208/288235490/153_align_1.jpg 386 402 307 349 25 1 1 1 1
20180208/288235490/484_align_1.jpg 176 189 149 215 26 2 1 1 1
20180208/288235490/113_align_1.jpg 287 316 244 219 30 1 1 1 1
20180208/288235490/772_align_1.jpg 157 297 6 117 14 1 1 1 1
20180208/288235490/772_align_2.jpg 183 163 454 284 29 1 1 2 1
20180208/288235490/772_align_3.jpg 155 150 153 285 24 1 1 2 1
20180208/288235490/263_align_1.jpg 344 341 372 329 26 1 1 1 1
20180208/288235490/584_align_1.jpg 205 194 261 205 32 1 1 1 1
20180208/288235490/408_align_1.jpg 282 287 207 376 26 1 1 1 1
20180208/288235490/408_align_2.jpg 235 223 448 321 26 2 1 2 1
假设我们在聚类过程中发现前面url存在问题,需要在路径前增加/images/,如下:
image/20180208/288235490/174_align_1.jpg
image/20180208/288235490/153_align_1.jpg
image/20180208/288235490/484_align_1.jpg
image/20180208/288235490/113_align_1.jpg
image/20180208/288235490/772_align_1.jpg
image/20180208/288235490/772_align_2.jpg
image/20180208/288235490/772_align_3.jpg
image/20180208/288235490/263_align_1.jpg
该怎么处理呢??
awk '{print "images/" $1 }' source >> target
其中$1代表第一个列,$0代表全部列!
坚持一件事情或许很难,但坚持下来一定很酷!^_^