Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-20-2005, 05:57 AM   #1
LQ Newbie
Registered: Dec 2004
Posts: 29

Rep: Reputation: 15
hotplug script for usb-pen

I want to create a little bash-script, that creats a file if insertet & delets it if its removed.
So the creation of the file works, but not the removal.

#! /bin/sh

if [ "$ACTION" = "add" ]; then
touch /home/simon/Desktop/file
echo -e "#!/bin/bash \nrm -r /home/simon/Desktop/file" $REMOVER
chmod +x $REMOVER
So why this does not work.
Also I am interested in why the following does not work?

if [ "$ACTION" = "remove" ]; then
rm /home/simon/Desktop/file
any hints

thanks in advance aspartat
Old 02-20-2005, 07:06 AM   #2
Registered: Aug 2003
Location: Castricum, The Netherlands
Distribution: Debian
Posts: 49

Rep: Reputation: 15

rm -f
Old 02-20-2005, 07:21 AM   #3
LQ Newbie
Registered: Dec 2004
Posts: 29

Original Poster
Rep: Reputation: 15
hm, does not work.

any suggestions


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
can't mount usb pen drive with hotplug dori Slackware 8 03-02-2007 02:22 AM
Usb pen not working in additional usb port ago.homer Linux - Hardware 3 07-26-2005 09:51 AM
Usb pen and hotplug, after Kernel 2.6.9 gatsu81 Linux - Hardware 0 12-23-2004 09:08 AM
Hotplug script for Usb drive Forced2Morph Linux - Hardware 0 10-15-2004 08:42 PM
stop hotplug from detecting things connected to usb (but still noticing usb itself) TheOneAndOnlySM Linux - Hardware 5 10-18-2003 10:35 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:25 AM.

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