mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
12 lines
280 B
Ruby
Executable file
12 lines
280 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
|
|
if ARGV.length == 0
|
|
$stderr.puts "Usage: #{$0} {one or more filenames"
|
|
$stderr.puts "Writes the files in place, with final newline removed."
|
|
exit 1
|
|
end
|
|
|
|
ARGV.each do |filename|
|
|
contents = File.read(filename)
|
|
File.write(filename, contents.chomp)
|
|
end
|