LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-15-2003, 10:58 AM   #1
the_rydster
Member
 
Registered: Nov 2003
Location: UK mostly.
Distribution: Slackware 9.1
Posts: 103

Rep: Reputation: 15
Naive scripting question (for Nautilus)


This is only the second script I have ever wrote. Basically I want to be able to send the contents of a directory to trash using the Nautilus scripting facility - Note I want to retain the original directory.

My attempt:

#!/bin/sh

# Send contents to trash

(cd $1)

(mv $(ls) /home/myself/.Trash)

Result is that EVERYTHING in my /home/myself gets to go to Trash.

I understood that $1 argument pertained to the selected file/directory.

Cheers.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nautilus 2.10.0 question pruhnke Linux - Software 2 09-05-2005 02:14 PM
Naive sendmail setup John Velman Slackware 1 08-30-2005 09:59 AM
suse 9.1 questions (extremely naive) mannis SUSE / openSUSE 5 10-15-2004 11:47 AM
Naive scripting question (for Nautilus) the_rydster Programming 3 11-15-2003 02:58 PM
petittion for naive linux half life. qanopus General 13 07-15-2003 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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