LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 02-20-2005, 05:57 AM   #1
aspartat
LQ Newbie
 
Registered: Dec 2004
Posts: 29

Rep: Reputation: 15
hotplug script for usb-pen


Hi,
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.

Code:
#! /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
fi
So why this does not work.
Also I am interested in why the following does not work?

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

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

Rep: Reputation: 15
try:

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

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

any suggestions
 
  


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
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


All times are GMT -5. The time now is 03:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration