422 reputation
1411
bio website
location
age
visits member for 2 years, 3 months
seen Aug 12 at 12:51

Aug
12
awarded  Famous Question
Aug
7
accepted Expand shell variable without globbing
Aug
7
comment Expand shell variable without globbing
Ok, so in the end the best workaround is checking for $2. Thanks.
Aug
7
comment Expand shell variable without globbing
Oh...yes, you're right. Ok, so if my script receives two arguments, it was given a wildcard. No way to distinguish between my-script foo.txt and my-script *.txt if there is only one txt file?
Aug
7
comment Expand shell variable without globbing
Thanks, I do need to use the $1 though. Perhaps I should have explained the task: a script that does when thing when passed a single filename (displays it), and another thing when passed a directory or file mask (runs ls). The "*.txt" is just one example of something that might be passed to the script.
Aug
7
comment Expand shell variable without globbing
OIC, basically a duplicate of this StackOverflow question: stackoverflow.com/questions/10452107/…
Aug
7
asked Expand shell variable without globbing
Jul
25
awarded  Yearling
Jul
25
asked Unzip all non-existing or older files from archive
Jul
25
answered Unzip all non-existing or older files from archive
Jul
8
awarded  Popular Question
Jul
2
awarded  Curious
Mar
18
accepted Pseudo-terminal will not be allocated because stdin is not a terminal
Feb
26
comment Can mouse wheel scrolling work in a /usr/bin/screen session?
Excellent, works on OS X too.
Feb
25
answered How can I force unzip / zip not to create a subdirectory when I extract it?
Feb
25
comment Why do piping and redirection work differently with here documents?
Great answer, thanks again.
Feb
25
comment Why do piping and redirection work differently with here documents?
Incidentally, do you know why you get the other behaviour: being stuck inside the subshell for one command?
Feb
24
comment Why do piping and redirection work differently with here documents?
Whoa, comprehensive answer, thanks very much.
Feb
24
comment Why do piping and redirection work differently with here documents?
Ah, I see. Seems obvious now. Is there (out of curiosity) a way of using brackets or something around the first way?
Feb
24
accepted Why do piping and redirection work differently with here documents?