Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to separate a File-Extension
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 33 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Hufschmidt  
View profile  
 More options Feb 8, 5:46 am
Newsgroups: comp.unix.shell
From: Michael Hufschmidt <Michael_Hufschm...@omnis.net>
Date: Wed, 08 Feb 2012 11:46:00 +0100
Subject: How to separate a File-Extension
Hello @ all,

I am writing a shell script to do some conversion:
   #!/bin/bash
   ls -1 *.cwk | while read FILE_OLD
   do
     FILE_NEW=$FILE_OLD".txt"
     cat  $FILE_OLD | [... do some recoding ...] > $FILE_NEW
   done

This converts myFile.cwk into myFile.cwk.txt. How could I calculate
FILE_NEW  without the extension in order to get myFile.txt?

Thanks in advance for any hints - Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Gibson  
View profile  
 More options Feb 8, 6:11 am
Newsgroups: comp.unix.shell
From: dave.gma+news...@googlemail.com.invalid (Dave Gibson)
Date: Wed, 08 Feb 2012 11:11:15 +0000
Local: Wed, Feb 8 2012 6:11 am
Subject: Re: How to separate a File-Extension

Michael Hufschmidt <Michael_Hufschm...@omnis.net> wrote:
> Hello @ all,

> I am writing a shell script to do some conversion:
>   #!/bin/bash
>   ls -1 *.cwk | while read FILE_OLD
>   do
>     FILE_NEW=$FILE_OLD".txt"
>     cat  $FILE_OLD | [... do some recoding ...] > $FILE_NEW
>   done

> This converts myFile.cwk into myFile.cwk.txt. How could I calculate
> FILE_NEW  without the extension in order to get myFile.txt?

With the ${var%pattern} (strip trailing pattern) parameter expansion:

 FILE_NEW=${FILE_OLD%.cwk}.txt

Consider using a for loop instead of piping ls' output to a while loop:

  for FILE_OLD in *.cwk
  do
   ...
  done


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Bacarisse  
View profile  
 More options Feb 8, 6:14 am
Newsgroups: comp.unix.shell
From: Ben Bacarisse <ben.use...@bsb.me.uk>
Date: Wed, 08 Feb 2012 11:14:16 +0000
Local: Wed, Feb 8 2012 6:14 am
Subject: Re: How to separate a File-Extension

Michael Hufschmidt <Michael_Hufschm...@omnis.net> writes:
> Hello @ all,

> I am writing a shell script to do some conversion:
>   #!/bin/bash
>   ls -1 *.cwk | while read FILE_OLD
>   do
>     FILE_NEW=$FILE_OLD".txt"
>     cat  $FILE_OLD | [... do some recoding ...] > $FILE_NEW
>   done

> This converts myFile.cwk into myFile.cwk.txt. How could I calculate
> FILE_NEW  without the extension in order to get myFile.txt?

  ${FILE_OLD%.cwk}.txt

In addition, I'd
(a) quote all variables so as to be safe against file names with spaces,
(b) use file globing rather than ls | while read, and
(c) remove the use of cat:

  for f in *.cwk; do recode-program <"$f" >"${f%.cwk}.txt"; done

If the "recode-program" is actually a pipeline, it's nice to make use of
some little-used syntax:

 for f in *.cwk; do <"$f" head | tr A-Z a-z >"${f%.cwk}.txt"; done

This keeps the pipe together in one place.

--
Ben.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hufschmidt  
View profile  
 More options Feb 8, 6:30 am
Newsgroups: comp.unix.shell
From: Michael Hufschmidt <Michael_Hufschm...@omnis.net>
Date: Wed, 08 Feb 2012 12:30:10 +0100
Local: Wed, Feb 8 2012 6:30 am
Subject: Re: How to separate a File-Extension
Am 08.02.2012 12:11 schrieb Dave Gibson:

Hello Dave,

thank you, this works perfectly. I do not use a loop because some of the
filenames may contain spaces.

Regards - Michael


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aragorn  
View profile  
 More options Feb 8, 7:47 am
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Aragorn <stry...@telenet.be.invalid>
Date: Wed, 08 Feb 2012 13:47:14 +0100
Local: Wed, Feb 8 2012 7:47 am
Subject: Re: How to separate a File-Extension
On Wednesday 08 February 2012 12:30, Michael Hufschmidt conveyed the
following to comp.unix.shell...

That shouldn't be a problem if you quote the variable.

--
= Aragorn =
(registered GNU/Linux user #223157)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Bacarisse  
View profile  
 More options Feb 8, 8:46 am
Newsgroups: comp.unix.shell
From: Ben Bacarisse <ben.use...@bsb.me.uk>
Date: Wed, 08 Feb 2012 13:46:28 +0000
Local: Wed, Feb 8 2012 8:46 am
Subject: Re: How to separate a File-Extension

Your code does not work if you have spaces in a file name and the use of
a 'for' loop is not cause any problems.  Using a 'for' loop with file
globing works just as well as 'ls | while read' when there are spaces,
but your use of unquoted variable expansions ($FILE_OLD rather than
"$FILE_OLD" for example) causes problems no matter how you get the names
to start with.

--
Ben.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Gibson  
View profile  
 More options Feb 8, 9:20 am
Newsgroups: comp.unix.shell
From: dave.gma+news...@googlemail.com.invalid (Dave Gibson)
Date: Wed, 08 Feb 2012 14:20:34 +0000
Local: Wed, Feb 8 2012 9:20 am
Subject: Re: How to separate a File-Extension

Michael Hufschmidt <Michael_Hufschm...@omnis.net> wrote:
> Am 08.02.2012 12:11 schrieb Dave Gibson:
>> Consider using a for loop instead of piping ls' output to a while loop:

>>    for FILE_OLD in *.cwk
> thank you, this works perfectly. I do not use a loop because some of the
> filenames may contain spaces.

Globbing (wildcard expansion) is performed after word splitting so the
'for' command will receive each of the names in the generated list as
a distinct item.

Try:

  for f in *.cwk ; do printf ' -->%s<--\n' "$f" ; done


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Bonomi  
View profile  
 More options Feb 9, 1:02 am
Newsgroups: comp.unix.shell
From: bon...@host122.r-bonomi.com (Robert Bonomi)
Date: Thu, 09 Feb 2012 00:02:48 -0600
Local: Thurs, Feb 9 2012 1:02 am
Subject: Re: How to separate a File-Extension
In article <9pf234Fph...@mid.individual.net>,
Michael Hufschmidt  <Michael_Hufschm...@omnis.net> wrote:

>Hello @ all,

>I am writing a shell script to do some conversion:
>   #!/bin/bash
>   ls -1 *.cwk | while read FILE_OLD
>   do
>     FILE_NEW=$FILE_OLD".txt"
>     cat  $FILE_OLD | [... do some recoding ...] > $FILE_NEW
>   done

>This converts myFile.cwk into myFile.cwk.txt. How could I calculate
>FILE_NEW  without the extension in order to get myFile.txt?

>Thanks in advance for any hints - Michael

The "classical" method uses basename(1).

Modern shells have string-manipulation constructs that let you do it without
the need to call an external utility.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris F.A. Johnson  
View profile  
 More options Feb 9, 4:08 pm
Newsgroups: comp.unix.shell
From: "Chris F.A. Johnson" <cfajohn...@gmail.com>
Date: Thu, 9 Feb 2012 16:08:42 -0500
Local: Thurs, Feb 9 2012 4:08 pm
Subject: Re: How to separate a File-Extension
On 2012-02-09, Robert Bonomi wrote:

   That is part of the standard Unix shell.

--
   Chris F.A. Johnson, author           <http://shell.cfajohnson.com/>
   ===================================================================
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph Spitzner  
View profile  
 More options Feb 10, 2:33 am
Newsgroups: comp.unix.shell
From: Ralph Spitzner <r...@spitzner.org>
Date: Fri, 10 Feb 2012 08:33:10 +0100
Local: Fri, Feb 10 2012 2:33 am
Subject: Re: How to separate a File-Extension
Robert Bonomi wrote:

[...]
> The "classical" method uses basename(1).

[...]

Am I missing somethinge here ?

bash-4.1# basename 01.\ Whiteman\ macht\ den\ Reim.mp3
01. Whiteman macht den Reim.mp3

Does basename somehow get confused if the filename has more
that one dot ? (a la Windblo$)

I usually use `awk -F "something" {'print $x'}` to get rid
of weird pre/extensions...

        -rasp

--
RTMPDump & ffmpeg are your friends..
     -icke


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stachu 'Dozzie' K.  
View profile  
 More options Feb 10, 3:09 am
Newsgroups: comp.unix.shell
From: "Stachu 'Dozzie' K." <doz...@go.eat.some.screws.spammer.invalid>
Date: Fri, 10 Feb 2012 08:09:09 +0000 (UTC)
Local: Fri, Feb 10 2012 3:09 am
Subject: Re: How to separate a File-Extension
On 2012-02-10, Ralph Spitzner <r...@spitzner.org> wrote:

> Am I missing somethinge here ?

> bash-4.1# basename 01.\ Whiteman\ macht\ den\ Reim.mp3
> 01. Whiteman macht den Reim.mp3

> Does basename somehow get confused if the filename has more
> that one dot ? (a la Windblo$)

And what did you expect from this command?

--
Secunia non olet.
Stanislaw Klekot


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Janis Papanagnou  
View profile  
 More options Feb 10, 4:41 am
Newsgroups: comp.unix.shell
From: Janis Papanagnou <janis_papanag...@hotmail.com>
Date: Fri, 10 Feb 2012 10:41:23 +0100
Local: Fri, Feb 10 2012 4:41 am
Subject: Re: How to separate a File-Extension
Am 10.02.2012 08:33, schrieb Ralph Spitzner:

> Robert Bonomi wrote:
> [...]
>> The "classical" method uses basename(1).
> [...]

> Am I missing somethinge here ?

Yes; reading the man page:

    "[...] any leading directory components removed. [...]"

> bash-4.1# basename 01.\ Whiteman\ macht\ den\ Reim.mp3
> 01. Whiteman macht den Reim.mp3

> Does basename somehow get confused if the filename has more
> that one dot ? (a la Windblo$)

> I usually use `awk -F "something" {'print $x'}` to get rid
> of weird pre/extensions...

Bad and unnecessary use of awk. For the given purpose,
in shell, you have

        ${parameter#word}
        ${parameter##word}
        ${parameter%word}
        ${parameter%%word}

Janis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile  
 More options Feb 10, 6:46 am
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Fri, 10 Feb 2012 12:46:15 +0100
Local: Fri, Feb 10 2012 6:46 am
Subject: Re: How to separate a File-Extension

Robert Bonomi wrote:
> Michael Hufschmidt  <Michael_Hufschm...@omnis.net> wrote:
>> I am writing a shell script to do some conversion:
>>   #!/bin/bash
>>   ls -1 *.cwk | while read FILE_OLD
>>   do
>>     FILE_NEW=$FILE_OLD".txt"
>>     cat  $FILE_OLD | [... do some recoding ...] > $FILE_NEW
>>   done

>> This converts myFile.cwk into myFile.cwk.txt. How could I calculate
>> FILE_NEW  without the extension in order to get myFile.txt?

> The "classical" method uses basename(1).

basename(1) does not remove filename suffixes ("extensions").  It removes
the leading directory components of a file path.

--
PointedEars

Please do not Cc: me. / Bitte keine Kopien per E-Mail.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile  
 More options Feb 10, 6:47 am
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Fri, 10 Feb 2012 12:47:15 +0100
Local: Fri, Feb 10 2012 6:47 am
Subject: Re: How to separate a File-Extension

Janis Papanagnou wrote:
> Am 10.02.2012 08:33, schrieb Ralph Spitzner:
>> Robert Bonomi wrote:
>> [...]
>>> The "classical" method uses basename(1).
>> [...]
>> Am I missing somethinge here ?

> Yes; reading the man page:

>     "[...] any leading directory components removed. [...]"

Which is not what the OP is looking for.

--
PointedEars

Please do not Cc: me. / Bitte keine Kopien per E-Mail.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephane Chazelas  
View profile  
 More options Feb 10, 6:57 am
Newsgroups: comp.unix.shell
From: Stephane Chazelas <stephane_chaze...@yahoo.fr>
Date: Fri, 10 Feb 2012 11:57:52 +0000
Local: Fri, Feb 10 2012 6:57 am
Subject: Re: How to separate a File-Extension
2012-02-10 12:46:15 +0100, Thomas 'PointedEars' Lahn:
[...]
> basename(1) does not remove filename suffixes ("extensions").  It removes
> the leading directory components of a file path.

[...]

~$ basename /path/to/foo.cwk .cwk
foo

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/basename.html

--
Stephane


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Casper H. S. Dik  
View profile  
 More options Feb 10, 7:02 am
Newsgroups: comp.unix.shell
From: Casper H.S. Dik <Casper....@OrSPaMcle.COM>
Date: 10 Feb 2012 12:02:36 GMT
Local: Fri, Feb 10 2012 7:02 am
Subject: Re: How to separate a File-Extension
Thomas 'PointedEars' Lahn <PointedE...@web.de> writes:

It also removes the listed extension:

        $ basename ~casper/file.c .c
        file

Casper


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile  
 More options Feb 10, 7:22 am
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Fri, 10 Feb 2012 13:22:01 +0100
Local: Fri, Feb 10 2012 7:22 am
Subject: Re: How to separate a File-Extension

Stephane Chazelas wrote:
> Thomas 'PointedEars' Lahn:
>> basename(1) does not remove filename suffixes ("extensions").  It removes
>> the leading directory components of a file path.
> [...]

> ~$ basename /path/to/foo.cwk .cwk
> foo

> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/basename.html

Thanks, that also works in GNU.  However, this does not help with unknown
or multiple "extensions", and requires another tool, so I think I will
usually stick to the equally POSIX-compliant shell parameter expansions
${x%.*} and ${x%%.*} (which also work in GNU bash).

<http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.h...>

--
PointedEars

Please do not Cc: me. / Bitte keine Kopien per E-Mail.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephane Chazelas  
View profile  
 More options Feb 10, 7:39 am
Newsgroups: comp.unix.shell
From: Stephane Chazelas <stephane_chaze...@yahoo.fr>
Date: Fri, 10 Feb 2012 12:39:29 +0000
Local: Fri, Feb 10 2012 7:39 am
Subject: Re: How to separate a File-Extension
2012-02-10 13:22:01 +0100, Thomas 'PointedEars' Lahn:

[...]

careful with that though:

$ x=/etc/init.d/foo
$ echo ${x%.*}
/etc/init

zsh/csh:
$ echo $x:r
/etc/init.d/foo

You may also need to consider /path/to/foo.x/ and foo-2.1.tar.gz

--
Stephane


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile  
 More options Feb 10, 7:52 am
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Fri, 10 Feb 2012 13:52:21 +0100
Local: Fri, Feb 10 2012 7:52 am
Subject: Re: How to separate a File-Extension

OK, so one needs to trim the directories first:

  my_basename3 () {
    x=${1%/}
    x=${x##*/}
    printf "%s" "${x%%.*}"
  }

> zsh/csh:
> $ echo $x:r
> /etc/init.d/foo

So zsh and csh are not POSIX-compliant?

> You may also need to consider /path/to/foo.x/ and foo-2.1.tar.gz

See above.

--
PointedEars

Please do not Cc: me. / Bitte keine Kopien per E-Mail.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Bacarisse  
View profile  
 More options Feb 10, 8:29 am
Newsgroups: comp.unix.shell
From: Ben Bacarisse <ben.use...@bsb.me.uk>
Date: Fri, 10 Feb 2012 13:29:40 +0000
Local: Fri, Feb 10 2012 8:29 am
Subject: Re: How to separate a File-Extension
Thomas 'PointedEars' Lahn <PointedE...@web.de> writes:

> Janis Papanagnou wrote:

>> Am 10.02.2012 08:33, schrieb Ralph Spitzner:
>>> Robert Bonomi wrote:
>>> [...]
>>>> The "classical" method uses basename(1).
>>> [...]
>>> Am I missing somethinge here ?

>> Yes; reading the man page:

>>     "[...] any leading directory components removed. [...]"

> Which is not what the OP is looking for.

They want to strip the suffix.  Of course, basename can do that too, but
if the OP were ever to generalise the script to work with paths other
than ., the full behaviour of basename would get in the way.

"${f%.cwk}.txt" is surely the right answer.

--
Ben.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Bacarisse  
View profile  
 More options Feb 10, 8:31 am
Newsgroups: comp.unix.shell
From: Ben Bacarisse <ben.use...@bsb.me.uk>
Date: Fri, 10 Feb 2012 13:31:59 +0000
Local: Fri, Feb 10 2012 8:31 am
Subject: Re: How to separate a File-Extension

<snip irrelevant clarification>

Oh dear.  I somehow missed the word "not".  Please ignore.

--
Ben.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephane Chazelas  
View profile  
 More options Feb 10, 12:52 pm
Newsgroups: comp.unix.shell
From: Stephane Chazelas <stephane_chaze...@yahoo.fr>
Date: Fri, 10 Feb 2012 17:52:05 +0000
Local: Fri, Feb 10 2012 12:52 pm
Subject: Re: How to separate a File-Extension
i2012-02-10 13:52:21 +0100, Thomas 'PointedEars' Lahn:
[...]
> > zsh/csh:
> > $ echo $x:r
> > /etc/init.d/foo

> So zsh and csh are not POSIX-compliant?

[...]

No, and they never claimed to be. zsh has a "sh" emulation mode
(also enabled when called as "sh") than aims at improving POSIX
compliance, where you need ${x:r} instead (but of course you
wouldn't if you were writing a POSIX script).

~$ a=a/a.b zsh -c 'echo $a:r'
a/a
~$ a=a/a.b ARGV0=sh zsh -c 'echo $a:r'
a/a.b:r
~$ a=a/a.b zsh -c 'emulate sh; echo $a:r'
a/a.b:r
~$ a=a/a.b ARGV0=sh zsh -c 'echo ${a:r}'
a/a

(ARGV0=x cmd, is zsh way to set the argv[0] of cmd).

(zsh also has csh and ksh emulation modes)

--
Stephane


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry Margolin  
View profile  
 More options Feb 10, 6:21 pm
Newsgroups: comp.unix.shell
From: Barry Margolin <bar...@alum.mit.edu>
Date: Fri, 10 Feb 2012 18:21:56 -0500
Local: Fri, Feb 10 2012 6:21 pm
Subject: Re: How to separate a File-Extension
In article <10386993.W8x7jVs...@PointedEars.de>,
 Thomas 'PointedEars' Lahn <PointedE...@web.de> wrote:

It optionally removes a suffix, but you have to supply the suffix
explicitly as the second argument.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile  
 More options Feb 10, 7:06 pm
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Sat, 11 Feb 2012 01:06:12 +0100
Local: Fri, Feb 10 2012 7:06 pm
Subject: Re: How to separate a File-Extension

Stephane Chazelas wrote:
> i2012-02-10 13:52:21 +0100, Thomas 'PointedEars' Lahn:
> [...]
>> > zsh/csh:
>> > $ echo $x:r
>> > /etc/init.d/foo

>> So zsh and csh are not POSIX-compliant?
> [...]

> No, and they never claimed to be. […]

OK, thanks for the explanation.  But then you do not have a point there.

--
PointedEars

Please do not Cc: me. / Bitte keine Kopien per E-Mail.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas 'PointedEars' Lahn  
View profile  
 More options Feb 10, 7:08 pm
Newsgroups: comp.unix.shell
Followup-To: comp.unix.shell
From: Thomas 'PointedEars' Lahn <PointedE...@web.de>
Date: Sat, 11 Feb 2012 01:08:02 +0100
Local: Fri, Feb 10 2012 7:08 pm
Subject: Re: How to separate a File-Extension

Barry Margolin wrote:
> Thomas 'PointedEars' Lahn <PointedE...@web.de> wrote:
>> basename(1) does not remove filename suffixes ("extensions").  It removes
>> the leading directory components of a file path.

> It optionally removes a suffix, but you have to supply the suffix
> explicitly as the second argument.

11-hours newsfeed?

--
PointedEars

Please do not Cc: me. / Bitte keine Kopien per E-Mail.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 33   Newer >
« Back to Discussions « Newer topic     Older topic »