Re: [Fish-users] Suffix pattern removing

2013-06-17 Thread aurelien coillet
Thanks for your feedback! I will do as you proposed and no longer rely on shell expansions. Thanks! 2013/6/17 Chris Wright > 2013/6/17 Luciano ES > >> I agree that 'basename' doesn't quite cut it, and your request is fair. >> >> On the other hand, I think you have grown too accustomed to the q

Re: [Fish-users] Suffix pattern removing

2013-06-17 Thread Chris Wright
2013/6/17 Luciano ES > I agree that 'basename' doesn't quite cut it, and your request is fair. > > On the other hand, I think you have grown too accustomed to the quirk of > one specific shell, although other shells have something similar. > > I would recommend you achieve what you want with sed,

Re: [Fish-users] Suffix pattern removing

2013-06-17 Thread Luciano ES
I agree that 'basename' doesn't quite cut it, and your request is fair. On the other hand, I think you have grown too accustomed to the quirk of one specific shell, although other shells have something similar. I would recommend you achieve what you want with sed, because it is really ubiquit

Re: [Fish-users] Suffix pattern removing

2013-06-17 Thread aurelien coillet
Well thanks, I knew this solution, but it only works if you know the extension of the file. What I'm looking for is something that remove any extension suffix, whatever it is. So, your last line should give "myfile" alone. 2013/6/17 Stestagg > One simple method would be to use basename: > > nam

Re: [Fish-users] Suffix pattern removing

2013-06-17 Thread Stestagg
One simple method would be to use basename: nameis=(basename $dataset .foo) this will perform the following, if $dataset = myfile then $nameis = myfile if $dataset = myfile.foo then $nameis = myfile if $dataset = /path/to/myfile.foo then $nameis = myfile if $dataset = /path/to/myfile.bar then $n