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

BASH scripting

Name: Anonymous 2009-09-08 13:25

sup
i'm using "read" to get a directory path into an env variable.
shit works well when the path doesn't contain an escape command for whitespaces like here:
/home/durp/pics/test_folder/
this here makes problems:
/home/durp/pics/test\ folder/
"read" simply ignores the escape command, but i need it. how do i circumvent that?

Name: Anonymous 2009-09-08 18:03

>>39
Medication time gramps. Sit down in your wheelchair or you'll brake a hip again.

Name: don't forget your sage 2009-09-08 18:22

INTERNET ARGUMENT time!
>>36
You're wrong!
>>37
Faggot!
>>34
You have no fucking idea, I know better!
>>39
Fuck you!

Name: Anonymous 2009-09-08 21:09

>>33
see >>29
Quote your shit and keep it quoted. I just tested your program with quotes around var and it worked. Also, use sh like a real man.

Name: Anonymous 2009-09-08 21:44

>>43
you troll me? shits not working...

Name: Anonymous 2009-09-08 21:47

I use bash. end thread.

Name: Anonymous 2009-09-08 22:01

>>44
No. Here is the code (different file path):
[code]
#!/bin/sh
var=$HOME/Documents/temp/theres\'\ a\space/

ls "$var"
ls $HOME/Documents/temp/theres\'\ a\space/
[\code]
Prints out fine.

Name: Anonymous 2009-09-08 22:02

>>47
Bah. New here. Haven't learned to BBCode. Also a space inbetween "a\" and "space"

Name: Anonymous 2010-12-25 13:54

<

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