Info about col command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Info about col command
# 1  
Old 09-09-2004
Data Info about col command

Hello every1.

Can any1 help me with the col command.

Wat is a reverse line feed.

Which kind of files u need to use the col command.
# 2  
Old 09-10-2004
Well if a linefeed puts you on the next line, a reverse linefeed puts you on the preceding line.

As the man page says, col is used with nroff. nroff can do some silly things. Let's say you're line number one and you want to print two lines worth of stuff. You would just print some stuff for line one. Then a newline character puts you on the next line. And finally you print some more stuff for line two. Nroff does not always work line that. First it prints a few characters on line one. Then it goes to line two and prints a few characters. Then back to line one and print a few more. And it can go back and forth many times. col catches all of this. It completely assembles a line and then prints it. That is much faster.

Mostly I use col with man. If you do "man cat > file", file will not be super readable. "man cat | col -b > file" will be perfect.
# 3  
Old 06-09-2006
MySQL changing col(1) command stdout as fully buffered?

Hi All,

I am talking about unix col(1) command used for some reverse line filtering etc.
And I notice that the stdout of this command is line buffered i.e. the stdout will flush the data in its buffer line by line. So the number of writes performed by stdout are more.

So now if I make stdout as fully buffered it will reduce the write hits. Smilie

But if I do these changes I think there will some problems
-> when slow terminals use col(1) as command , then the turn around time will get reduce for it self.
eg: cat file | col -b | lp
Here lp will receive data in terms of buffer size but before it was receving in terms of each lines.

So can I change change col(1) command's stdout to fully buffered?

So do any of you know some more problems related with this change , and can I see some link about col(1) command design stating that it should be either line buffered or fully buffered etc.


Waiting for positive replay,
Sunil kumar.



--
Thanks & Regards,

Sunil Kumar S
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk command 2nd col remove the '-' value

Hi, i was tried using the awk command for replacing '-' in the second column. but the below command replacing the entire file. cat 1.txt |awk '{gsub(/-/,"")}1' Input file 1,2,3,-4,5,6 1,-2,3,4,5,-6 1,2,3,4,5,6 1,-2,3,4,-5,6 Output file 1,2,3,-4,5,6 1,2,3,4,5,-6 1,2,3,4,5,6... (3 Replies)
Discussion started by: onesuri
3 Replies

2. Shell Programming and Scripting

Modifying col values based on another col

Hi, Please help with this. I have several excel files (with and .xlsx format) with 10-15 columns each. They all have the same type of data but the columns are not ordered in the same way. Here is a 3 column example. What I want to do add the alphabet from column 2 to column 3, provided... (9 Replies)
Discussion started by: newbie83
9 Replies

3. Shell Programming and Scripting

Printing from col x to end of line, except last col

Hello, I have some tab delimited data and I need to move the last col. I could hard code it, awk '{ print $1,$NF,$2,$3,$4,etc }' infile > outfile but it would be nice to know the syntax to print a range cols. I know in cut you can do, cut -f 1,4-8,11- to print fields 1,... (8 Replies)
Discussion started by: LMHmedchem
8 Replies

4. UNIX for Advanced & Expert Users

Print line based on highest value of col (B) and repetion of values in col (A)

Hello everyone, I am writing a script to process data from the ATP world tour. I have a file which contains: t=540 y=2011 r=1 p=N409 t=540 y=2011 r=2 p=N409 t=540 y=2011 r=3 p=N409 t=540 y=2011 r=4 p=N409 t=520 y=2011 r=1 p=N409 t=520 y=2011 r=2 p=N409 t=520 y=2011 r=3 p=N409 The... (4 Replies)
Discussion started by: imahmoud
4 Replies

5. SuSE

my SQL Info command

Is there a command that will output all mysql details. eg. host name, port etc? Cheers Paul (1 Reply)
Discussion started by: runnerpaul
1 Replies

6. Ubuntu

Match col 1 of File 1 with col 1 File 2 and create a 3rd file

Hello, I have a 1.6 GB file that I would like to modify by matching some ids in col1 with the ids in col 1 of file2.txt and save the results into a 3rd file. For example: File 1 has 1411 rows, I ignore how many columns it has (thousands) File 2 has 311 rows, 1 column Would like to... (7 Replies)
Discussion started by: sogi
7 Replies

7. UNIX for Dummies Questions & Answers

Info about ps command

Hi all, When a process is hung in unix and when we list the process using "ps" command, then does the elapsed timeELAPSED column time display the time elapsed since the process started to the time till the "ps"command was called. Or does the elapsed time column display only the time since the... (4 Replies)
Discussion started by: aixjadoo
4 Replies

8. HP-UX

changing col(1) command stdout as fully buffered?

Hi All, I am talking about unix col(1) command used for some reverse line filtering etc. And I notice that the stdout of this command is line buffered i.e. the stdout will flush the data in its buffer line by line. So the number of writes performed by stdout are more. So now if I make stdout... (0 Replies)
Discussion started by: sunilsbjoshi
0 Replies

9. UNIX for Advanced & Expert Users

changing col(1) command stdout as fully buffered?

Hi All, I am talking about unix col(1) command used for some reverse line filtering etc. And I notice that the stdout of this command is line buffered i.e. the stdout will flush the data in its buffer line by line. So the number of writes performed by stdout are more. So now if I make stdout... (0 Replies)
Discussion started by: sunilsbjoshi
0 Replies

10. UNIX for Advanced & Expert Users

Help On col command

Hello Can Any1 tell me the difference between the col command and the col command with the -f option. I tried running both of them but i can't see any difference. Please guide me. (1 Reply)
Discussion started by: rahulrathod
1 Replies
Login or Register to Ask a Question