Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006


(NEW!) or to change out of the trip! Headache

And the former is somewhat different note

Need to be in the form of two documents into one document

Document 1

[code]10463
CLOSED
Option
10477
STARTED
10524
CLOSED
Option
10535
CLOSED
Option
10536
CLOSED
INVALID
10564
CLOSED
Option
10693
NEW
10740
CLOSED
FIXED[/code]

Document 2

Closed option [code]10463
10477 STARTED
10524 Closed option
10535 Closed option
10,367 Closed INVALID
10564 Closed option
10,693 NEW
10,740 Closed FIXED[/code]

And the former 萜 some differences, the increasing difficulty that way? Thank you

(NEW!) or to change out of the trip! Headache

Even be the same token :
[code]xargs -n3 "File

Or

Sed 'N;N;s/\n/ /' file[/code]

(NEW!) or to change out of the trip! Headache

Sorry, did not look carefully *^_^*

(NEW!) or to change out of the trip! Headache

Is ah, the figure behind some of his party, some two lines.

(NEW!) or to change out of the trip! Headache

[code]$cat File|tr '\n' '' |awk '{gsub (/ ([0-9]) 12000 .0 "\n&") ;print}'
10463 Closed option
10477 STARTED
10524 Closed option
10535 Closed option
10,367 Closed INVALID
10564 Closed option
10,693 NEW
10,740 fixed Closed

[/code]

(NEW!) or to change out of the trip! Headache

Deeply admire, God Zhennai

(NEW!) or to change out of the trip! Headache

MM you too fast, etc. I
[code]cat File|xargs|sed 'depends strongly [0-9]/@&/g' s |tr '@' '\n' |sed 's/^ 4003rd' [/code]

(NEW!) or to change out of the trip! Headache

Haha

(NEW!) or to change out of the trip! Headache

[code]$cat File|while read i;do
"Echo-n" $i ";done|sed 's/[0-9]\{1, \}/\
"&/g ';echo

10463 Closed option
10477 STARTED
10524 Closed option
10535 Closed option
10,367 Closed INVALID
10564 Closed option
10,693 NEW
10,740 Closed FIXED[/code]

(NEW!) or to change out of the trip! Headache

(NEW!) or to change out of the trip! Headache

-->
Awk Lane gsub function and sub function are used to match patterns of substitution.
Awk '{sub (/ model / "want to have the characters") ;print}'
Such as :
$echo Abc|awk '{sub (/ u "A") ;print}'
Abc
$echo Abca|awk '{sub (/ u "A") ;print}'
Abca
$echo Abca|awk '{gsub (/ u "A") ;print}'
AbcA

(NEW!) or to change out of the trip! Headache

Understand the point g overall flavor, thank you!
"\n&" In the earlier match (\d+) before adding "\n"! So I have an empty row in front of the output! Do not know right!
Hee hee go up in smoke :)



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com