How to simulate column command in Solaris?

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
# 1  
How to simulate column command in Solaris?


Does anyone know how to have a similar output like below on Solaris without using column?
The output below is on Linux that uses the column and there is no column command in Solaris.

$ sort /tmp/x.txt | uniq | column -c 50
csfd0   csfd5   mchd11  mchp1   mpeq2   nocd20
csfd1   csfd8   mchd12  mcht1   mpet1   nocd3
csfd10  csfd9   mchd15  mcht11  nocd0   nocd5
csfd11  csft1   mchd2   mcht3   nocd1   nocd8
csfd12  csft11  mchd20  mped0   nocd10  nocd9
csfd15  csft3   mchd3   mped1   nocd11  nocp1
csfd2   mchd0   mchd5   mped10  nocd12  noct1
csfd20  mchd1   mchd8   mped15  nocd15  noct11
csfd3   mchd10  mchd9   mped20  nocd2   noct3

Found this command via Googling. This is more or less what am after but I want to put more spaces between columns though? Any tips on how to do this?

$: sort /tmp/x.txt | uniq | paste -s -d"\t\t\t\t\t\t\t\\t\n" -
csfd0   csfd1   csfd10  csfd11  csfd12  csfd15  csfd2   csfd20  csfd3
csfd5   csfd8   csfd9   csft1   csft11  csft3   mchd0   mchd1   mchd10
mchd11  mchd12  mchd15  mchd2   mchd20  mchd3   mchd5   mchd8   mchd9
mchp1   mcht1   mcht11  mcht3   mped0   mped1   mped10  mped15  mped20
mpeq2   mpet1   nocd0   nocd1   nocd10  nocd11  nocd12  nocd15  nocd2
nocd20  nocd3   nocd5   nocd8   nocd9   nocp1   noct1   noct11  noct3

Last edited by newbie_01; 1 Week Ago at 07:39 AM.. Reason: More information
# 2  
You should post the contents of your original data (in the file below):


... if you need expert help.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Gadgets
Difficulty: Easy
The communication protocol NFC stands for Near-Field Control.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simulate enter key

I have a popup window that appears on every boot up. I would like to have it dismissed automatically each time instead of having to hit the enter key. I thought I could write a script that would execute on startup. I tried this xdotool key return andy@7_~/Downloads$ xdotool key ... (7 Replies)
Discussion started by: drew77
7 Replies

2. Red Hat

Simulate Storage

Hello, I wanted to simulate SAN on my VMware PLayer running RHEL. Is there any tool that can be used to simulate storage setup for learning/testing? THanks, (1 Reply)
Discussion started by: ikn3
1 Replies

3. UNIX for Dummies Questions & Answers

Sort command in one column and not effect to another column

If my data is numerical : 1 = 101 2 = 102 3 = 104 4 = 104 7 = 103 8 = 103 9 = 105 I need the result like below: 1 = 101 2 = 102 3 = 103 4 = 103 7 = 104 8 = 104 9 = 105 (4 Replies)
Discussion started by: GeodusT
4 Replies

4. Shell Programming and Scripting

awk command to print only selected rows in a particular column specified by column name

Dear All, I have a data file input.csv like below. (Only five column shown here for example.) Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 3,2,4,5,6 5,3,5,5,6 From this I want the below output Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies

5. Shell Programming and Scripting

command for converting 4 column data to 1 column

dear friends I want to convert four column data to one column data. For example: from 1, 2, 3, 4 5, 6, 7, 8to 1 2 3 4 5 6 7 8what is the general command for that type of convertion. thanks (5 Replies)
Discussion started by: rpf
5 Replies

6. Programming

Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX

Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies

7. UNIX for Advanced & Expert Users

simulate function keys

hi, is it possible to simulate the function keys in a unix script, like simulating an enter key press. if it is possible can anyone tell me how it is ? (1 Reply)
Discussion started by: sais
1 Replies

8. UNIX for Advanced & Expert Users

Simulate CRON job

Does anyone know how I can simulate a cron job execution via UNIX scripting or is there a command/tool that simulate this? I have a file I called "appSchedule.txt", it contains below lines: 00 03 * * 1-6 RED start 00 06 * * 0 RED start 00 21 * * * RED stop 00 03 * * 1-6 ... (1 Reply)
Discussion started by: Orbix
1 Replies

9. UNIX for Dummies Questions & Answers

Newbie: Simulate unix on my pc

Hi, i am new with unix. Just came back from a course, unix basics for aix. So for me to practice, i want to install a simulation program for unix om my Windows Xp pc. Dual boot must it be. Does anybody have a suggestion for this dummy??? Thnx! Paul (5 Replies)
Discussion started by: welbp00
5 Replies

10. IP Networking

Simulate 'try again' case

Hi, I was searching thro the topic and could not find a thread which zeroes in on the case i'm trying to simulate. Basically I have a need to simulate DNS Try again cases, without bringing the dns_sever down (by manipulating the entries in /etc/resolv.conf under 'nameserver' tag). I am so... (5 Replies)
Discussion started by: srinivasan_85
5 Replies

Featured Tech Videos