c-martinez / shellther

shell link to etherpad
8 stars 5 forks source link

script does not have -f option #1

Closed mkuzak closed 8 years ago

mkuzak commented 8 years ago

my script says usage: script [-adkpqr] [-t time] [file [command ...]] it does not accept -f option I'm on OS X El Capitan, unfortunately script does not have the option to print out its version, so I don't know what version it is.

c-martinez commented 8 years ago

Damn it mac!

-f, --flush run flush after each write

Do you know how often mac writes to file? If often enough, we can drop the -f...

mkuzak commented 8 years ago

isn't it -t option?

mkuzak commented 8 years ago

by the way have you checked if it works on windows? is there script on windows?

c-martinez commented 8 years ago

No, -t:

-t, --timing[=<file>] output timing data to stderr (or to FILE)

which means it adds timestamps to the output, I think.

Not sure it works on windows (haven't tested) -- but I think git bash does

mkuzak commented 8 years ago

hm, in my man pages it says: -t time Specify the interval at which the script output file will be flushed to disk, in seconds. A value of 0 causes script to flush after every character I/O event. The default interval is 30 sec- onds.

c-martinez commented 8 years ago

ah, then it is -t in mac... grrr... We need to add an if mac do this, if linux do that, if windows the other..

c-martinez commented 8 years ago

I think this should solve our problem.

@mkuzak - can you confirm you get darwin ?

mkuzak commented 8 years ago

I do get darwin

c-martinez commented 8 years ago

good stuff...

c-martinez commented 8 years ago

@mkuzak -- try again. 2b71e10 adds check for os. Still will need to see how it works on windows.

c-martinez commented 8 years ago

Tried on windows, script does not exist (not even in git bash!). So windows will not be supported at the moment. Tough luck for windows users, but I think we'll need a windows expert to find a solution there.

mkuzak commented 8 years ago

actually this is not that bad, this is the trainer who will use it, so higher chance he'll be on Linux or Mac

c-martinez commented 8 years ago

Exactly, that's why I'm not too worried about this.