From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: MIME-Version: 1.0 Sender: geert.uytterhoeven@gmail.com In-Reply-To: <4992539.3i9E3kRg7r@avalon> References: <1480627909-19207-1-git-send-email-kieran.bingham+renesas@ideasonboard.com> <1480627909-19207-3-git-send-email-kieran.bingham+renesas@ideasonboard.com> <4992539.3i9E3kRg7r@avalon> From: Geert Uytterhoeven Date: Mon, 13 Feb 2017 15:17:10 +0100 Message-ID: Subject: Re: [PATCHv2 2/5] scripts: Provide bin2png.sh helper To: Laurent Pinchart Cc: Kieran Bingham , Kieran Bingham , Linux-Renesas Content-Type: text/plain; charset=UTF-8 List-ID: Hi Laurent, On Mon, Feb 13, 2017 at 3:03 PM, Laurent Pinchart wrote: >> +PNM=$(echo $FILE | sed -e 's|\.bin$|.pnm|') > > You can write this as > > PNM=${FILE/.bin/.pnm} / doesn't just match the suffix, try with waste.bin.picture.bin :-) PNM=${FILE%.bin}.pnm Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds