blob: fadca7b21e0b953a05b7a7fe8d6477b8ac58f33b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/env seed
const Gio = imports.gi.Gio;
var path = '/dev/stdin';
if (Seed.argv.length >= 3) {
path = Seed.argv[2];
}
var file = Gio.file_new_for_path(path);
var istream = new Gio.DataInputStream.c_new(file.read());
var line;
while ((line = istream.read_line_utf8()) != undefined) {
print(unescape(line.replace(/\+/g, ' ')));
}
istream.close();
|