News for hackers. Stuff that matters.
Re:Useful command-line scripts for web developers (or anyone... by uggedal on Friday June 05, 2009 @11:38AM (#643360)
> Bash script to append a .txt extension to a filename

Why?

Re:Useful command-line scripts for web developers (or anyone... by silentbicycle on Friday June 05, 2009 @12:31PM (#643449)
And regardless of whether it's necessary in the first place, why is it a bash script rather than a sh script? Very few of these use bash-specific extensions, and the BSDs don't necessarily have bash installed.

Things like that make porting from Linux to BSD and other Unices tons of fun.

Re:Useful command-line scripts for web developers (or anyone... by mitechka on Friday June 05, 2009 @02:37PM (#643690)
A more general case would be: How to change a pattern in a bunch of file names from X to Y:

  for i in *X*; do mv $i ${i/X/Y}; done
Re:Useful command-line scripts for web developers (or anyone... by ori_b on Friday June 05, 2009 @02:47PM (#643707)
Or just use 'rename':

     $ rename s/foo$/bar/ *foo