File path weirdness


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File path weirdness
# 1  
Old 02-07-2011
File path weirdness

I want to be able to drag and drop a file into a script in the terminal but it doesn't like the /home/user prefix.
How do I get around this?
# 2  
Old 02-07-2011
Not sure I get what your trying to do. But if this works for other
directories I would check the permissions on the file system where your
trying to place the file. Open it up with chmod 777 and see if that solves
your problem than close it up as needed.
# 3  
Old 02-07-2011
The sledgehammer 777 is almost never the solution no matter what your problem is.

Please post your script so we can see how it processes parameters. You'll probably have to modify it to handle absolute paths if it doesn't take them already.
This User Gave Thanks to Corona688 For This Post:
# 4  
Old 02-07-2011
Quote:
Originally Posted by pluto7777
I want to be able to drag and drop a file into a script in the terminal but it doesn't like the /home/user prefix.
How do I get around this?
Are you trying to use the mouse to drag and drop a saved file into a terminal editor?
# 5  
Old 02-07-2011
@pluto7777
Please take the advice of Corona688 and do not blindly change permissions to 777 on the advice from BeefStu. IMHO. It is the sign of a rank amateur and causes more problems than it ever fixes.
And ... in this case it is totally irrelevant to the question.

@pluto7777
Please expand considerably on the description of your problem, describing: what you did; what you expected to happen; and what actually happened (mentioning any error messages).

Last edited by methyl; 02-07-2011 at 08:06 PM.. Reason: punctuation
# 6  
Old 02-07-2011
Quote:
Originally Posted by AlphaLexman
Are you trying to use the mouse to drag and drop a saved file into a terminal editor?
Yes. Here's the script. Just a simple video to animated gif maker.
Code:
#!/bin/bash

echo -n "Open File: "
IFS=: read input
echo -n "Size WxH: "
read size
echo -n "Colors 1-256: "
read color
echo -n "Frames Per Second: "
read frames
echo -n "Name Output: "
read output
ffmpeg -i "$input" -r "$frames" image%4d.png
mogrify -format gif *.png
gifsicle --resize "$size" --color-method blend-diversity -i -l0 -O2 -k "$color" *.gif > "$output"

I have a video file named Video01. I want to be able to drag and drop this file into Open File prompt.
Typing Video01 works. Dragging and dropping the file inserts a prefix /home/user/Video01 which does not work.

---------- Post updated at 06:10 PM ---------- Previous update was at 05:56 PM ----------

@pluto7777
Please expand considerably on the description of your problem, describing: what you did; what you expected to happen; and what actually happened (mentioning any error messages).[/QUOTE]

file not found is the error

Last edited by Franklin52; 02-08-2011 at 03:06 AM.. Reason: Please use code tags, thank you
# 7  
Old 02-07-2011
What terminal text editor are you using? Not all editors can copy/paste from the X11 clipboard.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies

2. Shell Programming and Scripting

Joining 3 line weirdness

Hi all you Unix/Linux gurus, So, I have something strage going on and need a sanity check... I have 2 files that both contain 3 lines of text... File1 - called t: CN66270E90 94:57:a5:d3:db:aa 94:57:a5:d3:db:ab File2 - called tt: hostname 5.7.2.7 72:8C:36:3B:5A:17 (2 Replies)
Discussion started by: joeg1484
2 Replies

3. Solaris

Solaris 11 sysconfig and zones weirdness

when I create a new zone either via zfs export template or installing the OS from the .iso I get a weird problem. once I create the zone and login for the first time to the console I get the sysconfig menu. I do the config setup and exit the zone boots normally. The next time I reboot, I have to do... (0 Replies)
Discussion started by: os2mac
0 Replies

4. Solaris

Zpool device weirdness

Weird duplicate device in one of my nested raidz1s - device is shown as both online and unavailable, with a hot spare showing up as degraded as well. Any thoughts on how I should proceed? root@storage# zpool status tank pool: tank state: DEGRADED status: One or more devices are... (6 Replies)
Discussion started by: DoohanMcGirk
6 Replies

5. UNIX for Dummies Questions & Answers

gedit newline weirdness

I have this file cd /media/AUDIO/WAVE/9780743561181 ~/Desktop/mp3-to-m4b 9780743561181-UNLEASHING THE IDEA VIRUS "UNLEASHING THE IDEA VIRUS" "GODIN, SETH" 2006 n cd /media/AUDIO/WAVE/9780743561204 ~/Desktop/mp3-to-m4b 9780743561204-STALIN'S GHOST "STALIN'S GHOST" "SMITH, MARTIN" 2007 n cd... (1 Reply)
Discussion started by: glev2005
1 Replies

6. Shell Programming and Scripting

Retrieve directory path from full file path through sh

Hi, I have a file abcd.txt which has contents in the form of full path file names i.e. $home> vi abcd.txt /a/b/c/r1.txt /q/w/e/r2.txt /z/x/c/r3.txt Now I want to retrieve only the directory path name for each row i.e /a/b/c/ /q/w/e/ How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies

7. Solaris

SSH weirdness

I've configured a new container/zone on Solaris 10 (Sparc) and I'm using Centrify for LDAP authentication to AD. My ssh client is as follows Sun_SSH_1.1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f I'm seeing some strange behavior from ssh. When I ssh onto the new zone to myself (non-root... (2 Replies)
Discussion started by: CDM
2 Replies

8. IP Networking

ftp and ssh weirdness

i've just setup my desktop (ubuntu 8.04) to run vsftpd and sshd. i have two laptops, both running linux. on one laptop i can connect to the desktop via ftp and ssh and everything works fine. so i don't think there's a problem with the server. on the other laptop i can't connect to the desktop... (3 Replies)
Discussion started by: darkmatter14B
3 Replies

9. UNIX for Dummies Questions & Answers

cygwin bash startup command weirdness (part 1)

I am running (I believe) the latest stable version of cygwin CYGWIN_NT-5.1 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin on a win xp sp2 laptop. Suppose, to make things simple for now (but I may do a part 2 posting...), that I am in a dos shell, and I want to create a bash shell and have it... (1 Reply)
Discussion started by: fabulous2
1 Replies

10. UNIX for Dummies Questions & Answers

vi - replacing a relative path with absolute path in a file

Hi, I have a file with about 60 lines of path: app-defaults/boxXYZ....... I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command. Is there any other quick way to do this? Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies
Login or Register to Ask a Question