[U-Boot-Users] script to delete all trailing space

Aubrey Li aubrey.adi at gmail.com
Mon Mar 12 11:14:19 CET 2007


Hi all Custodians,

I'm suffering from coding style issues when I request a blackfin git
pull to the upstream u-boot. Here I wrote a simple script(attached) to
delete all the trailing space in the files. Hope it's useful for you
and feel free to re-write it.

Best Regards,
-Aubrey

------------------------------------------
#!/bin/sh
# delete all the trailing white space characters (SPACE and
# TAB) at the end of all the lines in a file
# Usage:
#|______./strip-trailing-space.sh files
#
# The script:
#
#  Copyright (C) 2007 Aubrey Li, All Rights Reserved.
#
#  This script is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License version 2 as
#  published by the Free Software Foundation.
strip()
{
|_______cp $1 $1~
|_______sed -e 's/\s\+$//' < $1~ > $1
}

for i in $*
do strip $i
done
------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strip-trailing-space.sh
Type: application/x-sh
Size: 501 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070312/a0ec47c3/attachment.sh 


More information about the U-Boot mailing list