bash problem ???

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Jeremy C. Reed
日付:  
題目: bash problem ???
On Fri, 5 Sep 2003, Nathan England wrote:

> nathan/is/brain/dead            I want dead
> my/computer/is/not/helping      I want helping
> this/sucks                              I want sucks

>
> get it?
> How can I accomplish this with bash?


#!/bin/bash
IFS=/
for last in $1 ; do : ; done
echo last is $last

(You mentioned "bash", you could also use other tools, like awk.)

Jeremy C. Reed
http://bsd.reedmedia.net/