LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-07-2004, 11:51 PM   #1
m0nk3yb0y
LQ Newbie
 
Registered: Sep 2004
Distribution: debian
Posts: 7

Rep: Reputation: 0
Post help with bashtest expression


I need some help creating an expression that will test if a usb hard drive is connected.
ie:

if [expression to test if usb device is attached]; then

mount /dev/device

fi

--m0nk3yb0y
 
Old 09-08-2004, 01:36 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
try to look at /proc directory, in particular the /proc/bus/usb/devices file and you may try a grep on it, or maybe a grep on dmesg
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need help with regular expression aecaudel Programming 6 11-04-2005 05:28 AM
expression evaluation sharadgana Programming 1 01-10-2005 03:38 PM
Anyone know regular expression? ahhua Linux - Software 1 12-04-2003 08:13 AM
PHP Expression? HappyDude Programming 2 09-21-2003 12:35 AM
Regular Expression Help WeNdeL Linux - General 1 08-14-2003 10:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:35 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