LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-12-2007, 07:19 PM   #1
valkarin
Member
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 41

Rep: Reputation: 15
Sockets in bash


I read a cool tutorial on socket access in bash, however it requires /dev/tcp or /dev/ucp which do not exist on Debian or Debian based systems (such as Ubuntu). The functionality has to be compiled into bash and the node? has to be present in the system. Is there another method of doing this? I want to write a script that fetches a web page and then pipes it to an html viewer. I have a working version using telnet, but I would like to do it all in bash if I can.
 
Old 09-12-2007, 07:30 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by valkarin View Post
I read a cool tutorial on socket access in bash, however it requires /dev/tcp or /dev/ucp which do not exist on Debian or Debian based systems (such as Ubuntu). The functionality has to be compiled into bash and the node? has to be present in the system. Is there another method of doing this? I want to write a script that fetches a web page and then pipes it to an html viewer. I have a working version using telnet, but I would like to do it all in bash if I can.
You create /dev entries (nodes) with the mknod command:

http://www.faqs.org/docs/linux_admin/x797.html

man mknod

I think that you create /dev/tcp with:

mknod /dev/tcp c 30 36

I couldn't find the major and minor numbers for /dev/ucp.

-------------------
Steve Stites
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using sockets in a bash script? Thinking Programming 9 11-09-2005 07:25 AM
c and sockets Matir Programming 4 03-09-2005 04:15 PM
Sockets on RH 9.0 rjs2006 Linux - Newbie 1 01-17-2005 10:16 PM
Sockets sibtay Programming 4 10-08-2004 09:33 AM
sockets andox Programming 4 07-05-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration