LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2005, 10:28 AM   #1
MD3
Member
 
Registered: Apr 2004
Location: Italy
Distribution: Gentoo
Posts: 81

Rep: Reputation: 15
[bash] problem with a script


please.. have a look to this script:
Code:
#!/bin/bash

echo "mknod c `insmod my_dev.o` 0"
the command "insmod my_dev.o" produces "245" as output... so i expected to see
Code:
mknod c 245 0
when executing the script... but what i can see is
Code:
245
mknod c  0
why? and how can i obtain the desired result? thanks e.b.
 
Old 04-05-2005, 11:01 AM   #2
MD3
Member
 
Registered: Apr 2004
Location: Italy
Distribution: Gentoo
Posts: 81

Original Poster
Rep: Reputation: 15
i think i understood the problem:
"245" is NOT the output of insmod, but it's output from my_dev.o itself with a printk() C function...
now.. how can i use that output as a major number on mknod?

thanks
 
Old 04-05-2005, 11:37 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
The example in this link should answer your question.
 
Old 04-05-2005, 01:49 PM   #4
MD3
Member
 
Registered: Apr 2004
Location: Italy
Distribution: Gentoo
Posts: 81

Original Poster
Rep: Reputation: 15
emh.. i thank you for the time you spent.. but i think this is not what i'm actually looking for.. i'll try to explain better my problem. i know how to use the mknod command... i'd like to know how to redirect the output generated by a module (with the printk() fuction) to the stdin to use it as the 3rd parameter of mknod

thanks again and bye
 
  


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
bash script problem fatbastard spice Linux - General 2 08-24-2005 02:15 AM
bash script problem GATTACA Programming 3 06-13-2005 09:59 AM
Problem with this bash script cantabile Programming 3 06-06-2005 05:31 PM
bash script problem sorry99 Programming 2 09-20-2004 09:02 AM
Bash script problem kalleanka Programming 2 01-30-2004 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:26 AM.

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