The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Changing one column of delimited file column to fixed width column manneni prakash Shell Programming and Scripting 5 06-22-2009 06:27 AM
updating a column in a unix table for a particular row thanuman Shell Programming and Scripting 5 02-09-2009 06:52 PM
Sorting in unix using column number swat UNIX for Advanced & Expert Users 1 11-15-2007 06:59 AM
to delete a column in unix gaddesuneetha UNIX for Dummies Questions & Answers 8 12-12-2006 06:48 PM
delete 7th column in unix pavan_test UNIX for Dummies Questions & Answers 6 12-20-2005 03:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-29-2008
kevin55 kevin55 is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 7
the column utility takes input and formats it into columns (three columns as defualt i think) but its only in linux, not in unix. i know there are a few regular commands i can use to make a simple script to use it in unix, i just dont know the one command that could format it. would it be fmt
  #2 (permalink)  
Old 02-09-2009
dgerman dgerman is offline
Registered User
  
 

Join Date: Apr 2008
Location: NJ
Posts: 3
column uses environment variable COLUMNS as a definition of the width of the output in characters ( example 80 ) unless -c is specified.
  #3 (permalink)  
Old 09-29-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Java? That's an awk script.

Could could put it on one line and use no comments and shorter variable names if you wish, e.g.

Code:
ls | awk 'BEGIN{if(!(w>0))w=80}length>m{m=length}{a[NR]=$0}END{c=int(w/++m);for(i=1;i<=NR;i++){printf("%-"m"s",a[i]);if(!(i%c))print""}if(--i%c)print""}'
You could implement the same algorithm easily enough in pure shell code or perl if you preferred.

You may be thinking of something like ls | paste - - - - (to format ls output into four columns, but that won't adjust the column widths to make them line up.
  #4 (permalink)  
Old 09-30-2008
eric_hing eric_hing is offline
Registered User
  
 

Join Date: Oct 2002
Posts: 8
Question Samba 3.0.24 in SCO UnixWare 7.1.4

Please help me in troubleshooting my problem in Samba?
I tried to instal Samba 3.0.24 in our SCO UnixWare 7.1.4 but after installing the nmbd daemon is not running.
When i check the syslog from /var/adm, the following error appears:
Sep 30 13:04:22 unixeei nmbd[25169]: bind failed on port 137 socket_addr =0.0.0.0.



Thanks

Eric
  #5 (permalink)  
Old 09-30-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Please start your own thread.
  #6 (permalink)  
Old 10-01-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,575
As I already mentionned, look at pr...
Code:
co:/home/vbe/wks $ cat gaga
1234567890
qwertzuiop
asdfghjkl
<yxcvbnm,.
co:/home/vbe/wks $ pr -c 3 gaga|more


Oct 01 10:48 2008  gaga Page 1


1234567890              asdfghjkl               <yxcvbnm,.
qwertzuiop

Last edited by vbe; 10-01-2008 at 05:52 AM.. Reason: spelling...
Closed Thread

Bookmarks

Tags
linux commands, unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0