From: ichi@ihug.co.nz
To: BEN RITCHEY <linux-net@tcob1.net>
Cc: linux-newbie@vger.kernel.org
Subject: Re: FSpecs
Date: Fri, 15 Nov 2002 14:43:13 +0000 [thread overview]
Message-ID: <3DD50801.55ACE0D@ihug.co.nz> (raw)
In-Reply-To: MSGID_110=3a20=2f1_50638fc8@linuxnet
BEN RITCHEY wrote:
>
> Would it be possible in a Bash script to munge a
> Long File Name to the older DOS 8.3 format?
> In my case I need the first 8 characters and the
> last 4 (.xxx)
To which Paul Kraus replied:
> It would be a lot easier to do it with gawk or perl.
And hackob said:
> Use cut and/or gawk
Actually guys, all you need is bash:
--------------------------------------------------
example="long-filename.to.munge.txt"
echo ${example%${example#????????}}.${example##*.}
--------------------------------------------------
Cheers,
Steven
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2002-11-15 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-14 8:56 FSpecs BEN RITCHEY
2002-11-14 21:52 ` FSpecs Paul Kraus
2002-11-14 21:56 ` FSpecs hackob
2002-11-15 14:43 ` ichi [this message]
2002-11-15 2:57 ` FSpecs Ray Olszewski
[not found] ` <3DD54770.6EFEAF21@ihug.co.nz>
2002-11-15 20:42 ` FSpecs ichi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DD50801.55ACE0D@ihug.co.nz \
--to=ichi@ihug.co.nz \
--cc=linux-net@tcob1.net \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.