File: rmspaces

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (11 lines) | stat: -rwxr-xr-x 137 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

while [ "$*" != "" ]
do
  echo $1
  sed -i 's/[ \t]*$//' $1
  sed -i ':a;/^[ \n]*$/{$d;N;ba}' $1
  echo >> $1
  shift
done