bash problem ???

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
Subject: 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/