Is there any idea on how to automate convert the paragraph in one line in a file, this will happen after OCR the documents, OCR split every paragraph. I need to join all the paragraph in one line.
Code:
#cat file.txt
Code:
The Commission on Higher Education (CHED) was created through Republic Act 7722
otherwise known as the Higher Education Act of 1994. Consistent with the governmentâs
position of making education the central strategy for poverty reduction, the CHED shall
pursue the following objectives: (a) relevant and quality higher education within an
international milieu; (b) accessible and affordable higher education programs; (c) resolute
academic freedom to promote intellectual growth, learning, research and development to
produce high quality leaders and professionals; and (d) moral ascendancy for better
governance within its ranks and the entire higher education system.
Higher Education Budget. The total 2015 proposed budget for Social Services will
amount to P938.8 billion of which P450.2 billion (48.0%) is for Education, Culture and
Manpower Development. The proposed 2015 budget of CHED at P3.6 billion accounts for
0.4% of Social Services budget. On the other hand, the 2015 proposed budget for State
Universities and Colleges (SUCs) amounting to P43.3 billion is roughly 4.6% of total Social
Services budget (Table 1).
On the aggregate, higher education budget for 2015 shall increase by 1.8% from the 2014
level although this increase is much lower from the 2013-2014 increase of 14.3%. While
CHED experienced a substantial increase of 165.2% in 2013-2014, its proposed budget for
2015 implies a 55.6% decline from 2014. Meanwhile, SUCsâ proposal for 2015 shall expand
higher education institutionsâ (HEIs) budget by 13.8%, a significant increase from 2013-2014
expansion of 2.1% (Table 1).
Result should be this:
Code:
The Commission on Higher Education (CHED) was created through Republic Act 7722 otherwise known as the Higher Education Act of 1994. Consistent with the governmentâs position of making education the central strategy for poverty reduction, the CHED shall pursue the following objectives: (a) relevant and quality higher education within an international milieu; (b) accessible and affordable higher education programs; (c) resolute academic freedom to promote intellectual growth, learning, research and development to produce high quality leaders and professionals; and (d) moral ascendancy for better governance within its ranks and the entire higher education system.
Higher Education Budget. The total 2015 proposed budget for Social Services will amount to P938.8 billion of which P450.2 billion (48.0%) is for Education, Culture and Manpower Development. The proposed 2015 budget of CHED at P3.6 billion accounts for 0.4% of Social Services budget. On the other hand, the 2015 proposed budget for State Universities and Colleges (SUCs) amounting to P43.3 billion is roughly 4.6% of total Social Services budget (Table 1).
On the aggregate, higher education budget for 2015 shall increase by 1.8% from the 2014 level although this increase is much lower from the 2013-2014 increase of 14.3%. While CHED experienced a substantial increase of 165.2% in 2013-2014, its proposed budget for 2015 implies a 55.6% decline from 2014. Meanwhile, SUCsâ proposal for 2015 shall expand higher education institutionsâ (HEIs) budget by 13.8%, a significant increase from 2013-2014 expansion of 2.1% (Table 1).
I've looked at the join command which is able to perform what I need on two rows with a common field, however if I have more than two rows I need to join all of them.
Thus I have one file with multiple rows to be joined on an index number:
1 randomtext1
2 rtext2
2 rtext3
3 rtext4
3 rtext5... (5 Replies)
Hi, I'm trying to output all text from the first paragraph in a file that contains a specific string through the last paragraph in that file that contains that string.
Previously, I was outputting just each paragraph with that search string with:
cat in_file | nawk '{RS=""; FS="\n";... (2 Replies)
HI all,
i have a input file,i have to join 2nd line into firstline and 4th line into 2nd line and so on..
for this we also consider odd no. of line.It's operate on original input file but output file should temp file.
like ..
filename=cdr.cfg
line1
line2
line3
line4Desired output should be... (9 Replies)
I have one base file, and multiple target files-- each have uniform line structure so no need to use grep to find things-- can just define sections by line number.
My question is quite simple-- can I use sed to copy a defined block of lines (say lines 5-10) from filename1.txt to overwrite an... (3 Replies)
Hi everyone,
I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines).
Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory)
diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//'
Is there a better more efficient way to find the lines in one file... (5 Replies)
I have a file like this:
---------------------------------------------------------------
26
00:04:48,440 --> 00:04:51,440
I don't know why he can't just do
the Great Apache Flaming Arrow Act.
27
00:04:52,440 --> 00:04:54,839
Didn't you tell him
to use the gopher snake?
28... (1 Reply)
Hello UNIX gurus, I am new to the world of UNIX. Hopefully I am submitting my question at the right forum. Here is my dilemma -
I have a file with contents like this -
"line1","Hello","World","Today is a wonderful day","yes it is"
"line2","Hello","World","Today is a
beautiful day","oh... (8 Replies)
Hi
I have a file with contents:
NAMES
John
carrey
williams
How can I get all the names and store them in seperate variables(or arrays)
please keep in mind that the no. of such names is not known.Three here is a bogus value
~thanks (4 Replies)
Hi Guys,
Could you please advise how to join multiple details lines into single row, with HEADER 1 as the record separator and comma(,) as the field separator.
Input:
HEADER 1, HEADER 2, HEADER 3,
11,22,33,
COLUMN1,COLUMN2,COLUMN3,
AA1, BB1, CC1,
END: ABC
HEADER 1, HEADER 2,... (3 Replies)