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
Help Required: Command to find IP address and command executed of a user loggedout Security 2 4 Weeks Ago 05:12 PM
how to? launch command with string of command line options TinCanFury Shell Programming and Scripting 5 04-28-2008 03:06 PM
inconsistent ls command display at the command prompt & running as a cron job rajranibl Linux 5 07-30-2007 05:26 AM
How to use more than one MPE command STREAM with Unix command in a single shell? bosskr HP-UX 1 10-16-2006 01:16 PM
How to use more than one MPE command STREAM with Unix command in a single shell? bosskr Shell Programming and Scripting 0 09-19-2006 06:44 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-09-2004
Registered User
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 151
what is the use of cat32 command

I am using SFU 3.5 Korn shell.

I want to know the use of cat32 command and also the difference between cat and cat32. Are there any enhanced features that cat32 provides??

If anybody knows such details or anything more regarding cat32, please let me know.

Cheers,
Rahul
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-10-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
You may need to use "cat32" when constructing pipelines using native Windows commands. For example, if you find that piping the output of a Windows command into a pager such as more yeilds strange results, insert cat32 into the pipeline. e.g.

net.exe users | cat32 | more

This example is from the Microsoft site.

Cheers
ZB
Reply With Quote
  #3 (permalink)  
Old 12-10-2004
Registered User
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 151
The fact that

net.exe users | cat32 | more

and

net.exe users | more

are giving the same output to me is really confusing me.

Also tell me is there any other use of cat32 other than this piping problem for windows commands.
Reply With Quote
  #4 (permalink)  
Old 12-10-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,355
Microsoft's example doesn't seem to be very good. I've been using SFU for a while. But I had SP1 installed first. Possibly things were worse on an early version of the OS or something. The thing is though, while I can cause the problem to occur, I can't find an example of the problem that requires cat32 to solve. I can always solve the problem with just plain pld cat.

This fails for me:

( net.exe users ; cat excerpt ) | cat

Because we are writing into the second cat process, the net.exe process and the first cat process are writing to the same pipe. Both simply write, neither opens it. This is what fails. A unix process cannot write to an open pipe after a windows process has written to it. (excerpt is just a file I had laying around.)

So the idea is to use:
( net.exe users|cat32 ; cat excerpt ) | cat

But now net.exe is writing to a different pipe. And no one else needs to write to that particular pipe. We can switch pipes by just using an extra cat command:

( net.exe users|cat ; cat excerpt ) | cat

So I can't find an example where cat32 is absolutely required. *shrug*
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:03 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0