Re: The first dosemu-1.2.0 release candidate is available!

Bart Oldeman
2003-09-30T17:13:09Z

On Tue, 30 Sep 2003, Robert Komar wrote:

> this doesn't look like it will work if there is a space somewhere in
> the path. If awk is available on every system, then how about this:
>
> BOOT_DIR_PATH=`ls -l $HOME/.dosemu/drives/c | awk -F"-> " '{ print $2 }'`/..
>
> It uses "-> " as the field separator instead of the space. On my system,
> the last '/' isn't required (the contents of the link already have a
> trailing slash), but I guess it doesn't hurt to leave it there.

but this won't work if there is " -> " somewhere in $HOME ;)

How about
BOOT_DIR_PATH=`cd "$HOME/.dosemu/drives" && ls -l c | sed 's/.* -> //'`/..
in this case the source filename in "ls" won't have spaces.

That'll work as long as no user name or group name or month (in some
language) has " -> " in it.

An extra readline binary would be another headache -- where to find it?

perl is another option, but IIRC not completely standard, at least I
received patches a while ago to remove perl dependencies.

Bart