shell寫法 - Linux

Charlotte avatar
By Charlotte
at 2011-12-30T00:13

Table of Contents


請問一下
我有一個檔案
需要每四行 就切開輸出各個文件
指令是這樣下的
split -l 行數 file output

但產生的文件 會從outputaa.....outputzz

我需要檔名 就是四行中的第一行 當作檔名
請問 要怎樣修改指令
謝謝

--




--
Tags: Linux

All Comments

Todd Johnson avatar
By Todd Johnson
at 2011-12-31T08:05
for f in *; do read line <$f; mv $f $line; done

ubuntu 灌PCMANX時

Leila avatar
By Leila
at 2011-12-30T00:02
今天改善了 pcmanx-gtk2 當中對於 UAO copy/paste/input/article download 的支援 Ubuntu 10.04/10.10/11.04/11.10/12.04 的使用者可以試試看 https://launchpad.net/~fourdollars/+archive ...

如何刪掉層層資料夾,但保留裡面某檔案?

Franklin avatar
By Franklin
at 2011-12-29T14:23
D/1-1/[...]/file D/1-1/1-2/reserve D/1-1/1-2/file D/2-1/[...]/file D/2-1/2-2/[...]/file [...]略三十個 我想要把 D 底下的東西全部刪掉,但是保留 D/1-1/1-2/reverse 資料夾名稱基本上不會變 檔案 ...

Mint12 不順、常破圖

Adele avatar
By Adele
at 2011-12-29T11:54
用Mint4win在Win7裝了Mint12 大致還不錯 不過有些問題 CPU intel Core2Duo P7350 GPU ATI Radeon HD 3470 RAM 4G OS: Windows7 sp1 32-bit、Mint12 64-bit 1. 不是很順,尤其是網路,網路很lag 2. ...

phpMyAdmin

Rachel avatar
By Rachel
at 2011-12-29T11:47
最近在unbutu安裝LAMP全部套件 在phpMyAmdin時出現問題... 輸入 伺服器ip/asterisk時 有時帳密會都不進去 有時打不同帳密也會跑進去 只是會顯示↓ http://files.dotblogs.com.tw/jellycheng/1103/201139162741 ...

偵測背景執行結束

Madame avatar
By Madame
at 2011-12-29T08:58
我試了一下,以下是小弟的script(fool_test.sh): /*********************fool_test.sh*********************/ #/bin/sh (./program_1 andamp;andamp; echo and#34;program_1 is ...