exec | tee filename.txt doesn't work

o/p only to stdout  and empty filename.txt created.



On Wed, Oct 23, 2013 at 6:12 PM, Asokan Pichai <paso...@gmail.com> wrote:

> On 23 October 2013 17:18, Raja Mahalingam <raja82i...@gmail.com> wrote:
>
> > I need to schedule the script on CTRL_M job scheduler .....not  cron..
> > I am grabbing certain o/p from remote server through ssh from script
> ...so
> > I can't use tee command or echo >> in  the ssh commands.
> >
> > I have used exec >filename.txt inside a script, it redirects all the o/p
> to
> > the file.
> >
> would exec | tee filename.txt work?
>
>
> > My requirement is to get the o/p captured in both file and stdout
> >
> >
> > On Wed, Oct 23, 2013 at 5:11 PM, Asokan Pichai <paso...@gmail.com>
> wrote:
> >
> > > On 23 October 2013 16:10, Raja Mahalingam <raja82i...@gmail.com>
> wrote:
> > >
> > > > Hi all,
> > > >
> > > > I need to know how to redirect the o/p of the script both to stdout
> and
> > > to
> > > > file.
> > > >
> > > > I need to run the script from job scheduler,so I cant use pipes or
> tee
> > > > command from the command line.so the redirection need to be coded in
> > the
> > > > script itself.
> > > >
> > > You can use the tee command in the script and make the script execute
> > under
> > > cron.
> > > THis seems so simplistic that it will be better if you describe a
> little
> > > more
> > >
> > >
> > > >
> > > > --
> > > >
> > > > Regards ,
> > > >
> > > >   Thanks & Regards ,
> > > >   Raja Mahalingam
> > > >   Mobile: +91 9790963356
> > > > _______________________________________________
> > > > ILUGC Mailing List:
> > > > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> > > > ILUGC Mailing List Guidelines:
> > > > http://ilugc.in/mailinglist-guidelines
> > > >
> > >
> > >
> > >
> > > --
> > > Asokan Pichai
> > > *-------------------*
> > > We will find a way. Or, make one. (Hannibal)
> > >
> > > *To find everything profound — that is an inconvenient trait.* It makes
> > one
> > > strain one's eyes all the time, and in the end one finds more than one
> > > might have wished. -- Nietzsche
> > > _______________________________________________
> > > ILUGC Mailing List:
> > > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> > > ILUGC Mailing List Guidelines:
> > > http://ilugc.in/mailinglist-guidelines
> > >
> >
> >
> >
> > --
> >
> > Regards ,
> >
> >   Thanks & Regards ,
> >   Raja Mahalingam
> >   Mobile: +91 9790963356
> > _______________________________________________
> > ILUGC Mailing List:
> > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> > ILUGC Mailing List Guidelines:
> > http://ilugc.in/mailinglist-guidelines
> >
>
>
>
> --
> Asokan Pichai
> *-------------------*
> We will find a way. Or, make one. (Hannibal)
>
> *To find everything profound — that is an inconvenient trait.* It makes one
> strain one's eyes all the time, and in the end one finds more than one
> might have wished. -- Nietzsche
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> ILUGC Mailing List Guidelines:
> http://ilugc.in/mailinglist-guidelines
>



-- 

Regards ,

  Thanks & Regards ,
  Raja Mahalingam
  Mobile: +91 9790963356
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to