Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

bash script failing

Name: Anonymous 2010-06-13 21:03

been trying to make a script to open up several files using notepad++ but it keeps causing notepad++ to hang.
ttest="\"/home/username/Desktop/Fallout 3.desktop\" /home/username/Desktop/wine.desktop"
env WINEPREFIX="/home/username/nppwine" wine C:\\Program\ Files\\Notepad++\\notepad++.exe $ttest
The space in Fallout 3.desktop seems to be what is causing the problem because when I try multiple files that don't contain any spaces in their path it works fine. I am running those through bash, but they will be implemented into a nautilus script if it ever works as expected. When I use the contents of $ttest it works fine, just not when I use the variable
tl;dr bash script above is messing up when I use $ttest but works fine when I use the contents of $ttest

Name: Anonymous 2010-06-13 21:09

This isn't the tech support board.

Name: Anonymous 2010-06-13 21:09

No shit, it's a programming board and that is programming

Name: Anonymous 2010-06-13 21:16

Why don't you just escape the space "foo\ bar"

Name: Anonymous 2010-06-13 21:25

Because I want to implement this into a right click menu script so I will need to handle a variable no matter what.

Name: Anonymous 2010-06-13 21:26

>>3
You're right. I'll submit an RFE to have /prog/ renamed to Programmers. That'll resolve the issues with >>2.

Name: Anonymous 2010-06-13 21:33

Well I'm raging now...
#!/bin/bash
env WINEPREFIX="/home/username/nppwine" wine C:\\Program\ Files\\Notepad++\\notepad++.exe "$@"
Shit was as simple as that... All I needed to do originally was surround $@ with "" and it would have worked -_-

Name: Anonymous 2010-06-13 21:40

Fucking Windows developers.

Name: Anonymous 2010-06-13 21:44

>>1
May I suggest using Genuine Microsoft® Windows?

Name: Anonymous 2010-06-13 21:50

>>9
Why would you suggest that some one should install a virus?

Name: Anonymous 2010-06-13 21:55

>>10
Reminder: Two navigation boxes are located at the top. Be sure to use the box on the right.

Name: Anonymous 2010-06-13 23:20

>>11
boxes
IHBT

Name: Anonymous 2010-06-13 23:34

>>12
IHBT
IHBT

Name: Anonymous 2010-06-13 23:49

>>13
Not every trolling have been is spoiler caliber!

Name: Anonymous 2010-06-14 1:45

>>14
I agree. Mine was, his wasn't. Problem?

Name: Anonymous 2010-06-14 16:17

>>15

Thou enraged?

Name: Anonymous 2010-06-14 16:20

>>15
But if you agree, then how could you possibly have been trolIHBT

Don't change these.
Name: Email:
Entire Thread Thread List