8f04 Substitute for 'read' to read file descriptors - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > Userland Programming & Scripting

Userland Programming & Scripting C, C++, Python, Perl, Shell, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old February 9th, 2010, 17:03
angy angy is offline
Junior Member
 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Substitute for 'read' to read file descriptors

Hi!

I'm quite new to using FreeBSD in my network environment, I'm currently using, under linux, a script using a bunch of 'read' command to get the inputs of fd1.

The linux syntax I use is:
Code:
read -u 1 -d $'\0' from
I try to use read under FreeBSD but I cannot pass this arguments.
Is there a replacing command for that?

Thanks,
A

Last edited by DutchDaemon; February 9th, 2010 at 17:06. Reason: added [code] tags
Reply With Quote
  #2  
Old February 9th, 2010, 20:35
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,860
Thanks: 48
Thanked 2,061 Times in 1,890 Posts
Default

Looks like a bash thing

You could just install shells/bash and run the script on that. All you would need to do is to change the first line:
Code:
#!/usr/local/bin/bash
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read DWARF file rajukgp Userland Programming & Scripting 11 March 21st, 2012 09:06
[Solved] gjournal read error and spontaneous reboot on file removal attempt uisge System Hardware 2 December 9th, 2010 22:10
How to read a user's /var/mail/ file with PHP mharvey87 Userland Programming & Scripting 7 January 7th, 2010 14:25
tape read errors: how to read past? recover? monkeyboy System Hardware 5 May 13th, 2009 13:41
Cannot read from ext2 disk - g_vfs_done():da2[READ(snip)] error 5 skaffen General 0 March 6th, 2009 16:02


All times are GMT +1. The time now is 13:29.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0