LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 11: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


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 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 03:14 PM
Naive sendmail setup John Velman Slackware 1 08-30-2005 10:59 AM
suse 9.1 questions (extremely naive) mannis Suse/Novell 5 10-15-2004 12:47 PM
Naive scripting question (for Nautilus) the_rydster Programming 3 11-15-2003 03:58 PM
petittion for naive linux half life. schatoor General 13 07-15-2003 05:45 PM


All times are GMT -5. The time now is 08:46 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration