Re: Code editing feauture
- From: "Helmut Hullen" <Hullen t-online de>
- To: mc gnome org
- Subject: Re: Code editing feauture
- Date: 24 Apr 2008 16:26:00 +0200
Hallo, Michelle,
Du (linux4michelle) meintest am 23.04.08:
case `echo $1 |sed 's/^.*\.//'` in
c|h)
[...]
The `echo $1 |sed 's/^.*\.//'` is striping the prefix/name from the
filename. E.g.
echo main.c |sed 's/^.*\.//'
will result in
c
Better readable:
case "$1" in
*.c|*.h)
# do something
;;
esac
I should test if "case" makes "globbing" (with ? as 1-char-joker) or
"regex" (with . as 1-char-joker) ...
Viele Gruesse!
Helmut
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]