Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


Closed Thread
  Search this Thread
Old 02-18-2010, 12:48 PM   #1
Registered: Nov 2009
Posts: 141

Rep: Reputation: 25
removing quotes when dragging files to the terminal

I also posted this under "programming", but I am not sure if it is a bash issue.

The following script will work when I type the path to the file I want to checksum, but not when I drag the file to the terminal because the linux terminal (unlike the Mac) automatically puts quotes around the file path, which causes an error. I did not find anything in gconf-editor or anywhere else to alter this behaviour, and my post in Launchpad is unanswered so far. (the script in itself is not very useful, I just stumbled upon this error when experimenting with bash).

#!/bin/bash -x ## the x is just for debugging
echo 'paste the md5sum from the source website here:'
echo 'type path to file here:'
read NAME ## fails when I drag
if [ "$SHOULD" = `openssl dgst -md5 < $NAME` ]; then ## "$NAME" amounts to the same
echo 'verified'
echo 'verify failed!'

So, is there a workaround for stripping the quotes from the input, or can I configure the terminal to not quote the input when I drag a file into it (which I would prefer?)

I am currently logged in from Mac OS, but the question refers to ubuntu karmic with which I dual boot.
ADMINISTRATORS: Thanks for the quick reply to my newbie question about posting new threads. Actually I don't see now what the difficulty was; I guess I was tired from trying to debug the above script (not funny).
Old 02-18-2010, 12:50 PM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

If you think your other thread is in the wrong place, then report it to be moved. (I think it's maybe OK where it is.)

Closed Thread

bash, terminal, ubuntu

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
getting rid of quotes when dragging a file into the terminal nokangaroo Programming 6 02-21-2010 03:49 PM
Removing quotes from a CSV file with Perl Grafbak Programming 5 07-25-2006 03:23 AM
Using single quotes vs double quotes in PHP strings vharishankar Programming 6 07-11-2005 11:41 AM
Those quotes on the terminal simon_w Slackware 4 03-19-2005 07:08 AM
edit quotes from konsole terminal trinoo Slackware 6 02-02-2005 09:26 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:30 PM.

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