![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Korn: How to zero fill df output so it will sort properly | shew01 | Shell Programming and Scripting | 9 | 06-04-2008 10:34 AM |
| not getting the output properly | pmrajesh21 | SUN Solaris | 0 | 04-16-2008 10:43 AM |
| Output in my shell isn't showing properly. | satyakide | Shell Programming and Scripting | 7 | 04-01-2008 10:05 AM |
| lvm_queryvg call does not work properly and results in a sudden memory rise. | sandiworld | AIX | 0 | 11-15-2007 01:57 AM |
| SSH doesnt exit properly from command line | frustrated1 | SUN Solaris | 4 | 06-16-2005 04:30 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to output the results of the AT command - properly!
Hi,
I am new to UNIX and I am more used to simple commands like those in VMS. One of them is the ability to get the output from a job using the /out=<file> command in VMS. I want to submit a job (a set of unix commands) using the AT command but to get the output in a file like that used in VMS. Now I know many of you are saying, "just redirect it using the '>' character'. I tried this and it's not producing what I expected. I don't think it's as simple as that. For example (the qdesign command is a powerhouse (COGNOS) command, and not a unix command). Here is my BAT file ... #!/bin/csh /bin/date ################################################################ # Recompile global QUICK screens, for Sydney qdesign dict=/mis/sydmips/obj/phd.pdc << 'flag1' use /mis/sydmips/obj/compilemips.qks nolist exit 'flag1' I've tried submitting this with ... $ at -c -f compile.bat now > compile.out I get only the line that says it submitted the command $ echo compile.out | at -c -m now I get an email to say that it was "run", but no standard output of the BAT file! $ at -c -m now < compile.bat Again I get a job number, an email to say it ran but no actual output. How do I get actual output from the compile.bat routine, like as if I was running it online!? Thank you |
|
||||
|
How to output the results of the AT command - properly!
I would redirect my output in the file directly (as logging) like this:
#!/bin/csh ( /bin/date ################################################################ # Recompile global QUICK screens, for Sydney qdesign dict=/mis/sydmips/obj/phd.pdc << 'flag1' use /mis/sydmips/obj/compilemips.qks nolist exit 'flag1' ) > logfile 2>&1 or just for the HERE-document: #!/bin/csh /bin/date ################################################################ # Recompile global QUICK screens, for Sydney qdesign dict=/mis/sydmips/obj/phd.pdc << 'flag1' > logfile 2>&1 use /mis/sydmips/obj/compilemips.qks nolist exit 'flag1' Last edited by brouw005; 12-02-2005 at 09:54 AM.. |
|
||||
|
No it did not work actually
I am getting "too many ('s" error now.
The other issue is that is sends the output to the MAIL box and not to the file I specified in the redirection. And this is even without the "at -m" option. Please help! Last edited by SpanishPassion; 12-04-2005 at 07:34 PM.. Reason: Mistake in wording |
|
|||||
|
This is more like it. I was puzzled by your response stating that it had worked. You are using csh. The redirection code brouw005 used would work in sh, ksh, or bash, but not csh. Writing scripts in csh is not wise. Since you're new to Unix, you should start with a better shell. For a list of reasons, see Csh Programming Considered Harmful. One more reason: there are very few csh experts around to help you.
I think that: ) >& logfile might work for you. But no money back guarantees. I switched to ksh as soon as I could and I don't remember csh very well. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|