Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / UNIX Shell Programming - \?) Doesn't Work?

Author
Message
AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 24th Nov 2005 19:20
Hello. I am using the latest Cygwin release and the Bourne Again Shell. I am writing a DOS DIR clone to make ls easier. Here is what I have so far:



It gives me this error:



Why?

For the Software You Want, AMPERSAND LABORATORIES is the place!

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 24th Nov 2005 19:22
Quote: "I am writing a DOS DIR clone to make ls easier"

UNIX has a native dir command already doesn't it? Am I missing something here?

Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 24th Nov 2005 19:34 Edited at: 24th Nov 2005 19:37
ls or dir does the same thing, why duplicate? in fact asking Linux/Unix users to use Dos style commands is pretty much suicidal, I hope you own some asbestos underwear





Do parachute manufacturers have a refunds policy?
AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 24th Nov 2005 21:48
Is that the point? I wanted an easier-to-remember ls with two of my favorite options:

- -aLl - All files, long format
- -aCF - All files in columns with suffices

I didn't know about UNIX's DIR command until I started the project, so I renamed it MYDIR. I still want to know why \?) won't parse.

For the Software You Want, AMPERSAND LABORATORIES is the place!

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Nov 2005 00:06
It will, but you haev various errors in your code, and it's not structured in the best way either.

Try something like this:



For free Plug-ins and source code http://www.matrix1.demon.co.uk
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 25th Nov 2005 02:59
You don't need a whole shell script to just do that!

Whack this into your .login :



Voila.

Fat kids always win at see-saw.

The world is full of idiots. But an unusually high percentage seem to appear on my TV screen.

Login to post a reply

Server time is: 2024-11-16 04:29:42
Your offset time is: 2024-11-16 04:29:42