[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Отрезать расширение в bash



упс единичка в конце
$echo "filename.flac" | cut -d '.' -f 1

8 сентября 2008 г. 8:45 пользователь Павел Марченко <bblrlo@gmail.com> написал:
$echo "filename.flac" | cut -d '.' -f 2

8 сентября 2008 г. 1:05 пользователь -=Devil_InSide=- <devil_inside@mail.ru> написал:


,------[Dmitry Fedorov, Mon, 8 Sep 2008 04:44:07 +0700]
|8 сентября 2008 г. 4:26 пользователь Mikhail Ramendik написал:
|> Глобально: надоело путаться в bash, но чем бы другим делать простые связки
|> между несколькими утилитами?
|
|rc
|
|Description: an implementation of the AT&T Plan 9 shell
| rc is a command interpreter and programming language
| similar to sh(1). It is based on the AT&T Plan 9 shell of the
| same name. The shell offers a C-like syntax (much more so
| than the C shell), and a powerful mechanism for manipulating
| variables. It is reasonably small and reasonably fast,
| especially when compared to contemporary shells. Its use is
| intended to be interactive, but the language lends itself well
| to scripts.
|
|
|> Текущий вопрос: в $i есть filename.flac , надо получить просто filename,
|> как?
|
|basename $i .flac
|
|но путь он тоже отрежет, если есть.

`-----------------
а я, неумный человек, через sed/tr ето дело пускал
ы!
%:)

--
_________
mpd status:     [stopped]
**************************************
*          icq: 161874711            *
*  jabber:  devil_inside@jabber.ru   *
*irc.starlink.ru,#Gene, Devil_InSide *
*            ftp://gas/              *
*           http://gas/              *
*   Registered linux user #450844    *
**************************************


--
To UNSUBSCRIBE, email to debian-russian-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org




--
В смысле осмысления бессмысленного смысл тоже имеет определенную осмысленность!!!



--
В смысле осмысления бессмысленного смысл тоже имеет определенную осмысленность!!!

Reply to: