Re: [Tutor] Linux tail -f multiple log files

2009-01-06 Thread Kent Johnson
On Tue, Jan 6, 2009 at 7:34 PM, David wrote: > Hi, > This works fine if I don't use the -f option; > #!/usr/bin/python > from subprocess import call > from termcolor import colored > > def slog(): >sudo = "sudo" >tail = "tail" >sfile = "/var/log/messages" >print colored("", "blue")

Re: [Tutor] Linux tail -f multiple log files

2009-01-06 Thread Bill Campbell
On Tue, Jan 06, 2009, David wrote: >> >> Now if I do this to all the functions; >> def slog(): >> sudo = "sudo" >> tail = "tail" >> targ = "-f" # output appended data as the file grows >> sfile = "/var/log/messages" >> print colored("", "blue") >> call([sudo, tail, sfile]) >

Re: [Tutor] Linux tail -f multiple log files

2009-01-06 Thread David
Now if I do this to all the functions; def slog(): sudo = "sudo" tail = "tail" targ = "-f" # output appended data as the file grows sfile = "/var/log/messages" print colored("", "blue") call([sudo, tail, sfile]) Only the first function will print to the screen. thanks in

[Tutor] Linux tail -f multiple log files

2009-01-06 Thread David
Hi, This works fine if I don't use the -f option; #!/usr/bin/python from subprocess import call from termcolor import colored def slog(): sudo = "sudo" tail = "tail" sfile = "/var/log/messages" print colored("", "blue") call([sudo, tail, sfile]) def alog(): sudo = "sudo"