Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to output the results of the AT command - properly! Post 91393 by SpanishPassion on Thursday 1st of December 2005 07:08:18 PM
Old 12-01-2005
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
 

10 More Discussions You Might Find Interesting

1. AIX

lvm_queryvg call does not work properly and results in a sudden memory rise.

On AIX 5.3 host, the lvm_queryvg call does not work properly and results in a sudden memory rise. This is happening on one particular host and the call works fine on another host. Is this a known issue and is there any patch available for this? (0 Replies)
Discussion started by: sandiworld
0 Replies

2. Shell Programming and Scripting

Output in my shell isn't showing properly.

Hi! Can anyone tell me what went wrong in my shell script? for dt_val in `cut -f 1 -d '|' /prod/ods/satyaki/sqlldr/grp.dat` do echo $dt_val done And, the output is - 23 39 (7 Replies)
Discussion started by: satyakide
7 Replies

3. Solaris

not getting the output properly

i am entering the command, not get the total out put see the output what i am getting. SQL> select dbms_metadata.get_ddl ('TABLESPACE','SYSTEM') FROM DUAL; DBMS_METADATA.GET_DDL('TABLESPACE','SYSTEM') -------------------------------------------------------------------------------- ... (0 Replies)
Discussion started by: pmrajesh21
0 Replies

4. Shell Programming and Scripting

Korn: How to zero fill df output so it will sort properly

I'm looking for a way in Korn shell to zero fill (or space fill) the output from df so that it will sort properly. "Raw" output from df -k: df -k Filesystem kbytes used avail capacity Mounted on /dev/vx/dsk/rootvol 4131866 3593302 497246 88% / /proc ... (9 Replies)
Discussion started by: shew01
9 Replies

5. Shell Programming and Scripting

Output of AWK Results

In the following line The AWK statement parses through a listing for files and outputs the results using the {print} command to the screen. Is there a way to (a) send the output to a file and (b) actually perform a cp cmd to copy the listed files to another directory? ls | awk -va=$a -vb=$b... (1 Reply)
Discussion started by: rdburg
1 Replies

6. Shell Programming and Scripting

Date command is not working properly

Hi, in my script, i take the last month by a=$(date --date '1 month ago' +%Y%m) i expect that it give me in this month "March" as result 201402, but linux gave me 201403. IMPe@ABC123:> ~/date --date '1 month ago' +%Y%m 201403 i'm reasonably confused. Any idea? Thanks in advance, ... (2 Replies)
Discussion started by: IMPe
2 Replies

7. Shell Programming and Scripting

Always output 6 columns regardless of search results

If I am searching for AA then then BB in a loop, how do I make the output always contain 6 columns of comma separated data even when there may only be 4 search matches? AA11 AA12 AA13 AA14 BB11 BB12 BB13 BB14 BB15 BB16 Final output: AA11,AA12,AA13,AA14,,,... (14 Replies)
Discussion started by: jojojmac5
14 Replies

8. Shell Programming and Scripting

Get the return value and get the output to $results

cmd() { echo " " echo "$(whoami)@$(hostname):$(pwd)# $*" results=`eval $*` echo $results } I want to get the eval $* 's return value and pass it to a new variable $val, and get "eval $*" 's the ... (7 Replies)
Discussion started by: yanglei_fage
7 Replies

9. UNIX for Beginners Questions & Answers

sed command not working properly

This is my sample file cat bipin.txt Unix is an OS Unix has its own commmands Unix is a user friendly OS Unix is platform independent Unix is a time sharing OS the best OS to learn is Unix Abinitio uses Unix in backend When i use sed 's/Unix/Linux/' bipin.txt , only the first... (2 Replies)
Discussion started by: Bipin_1991
2 Replies

10. Shell Programming and Scripting

Redirecting the results to different output files

Hi All, I am trying a shell script and need your help on taking the results to different output files. I have tried the below code: nawk ' {CNF = (length()-10)/7 printf "%9s", substr ($0, 1, 9) for (i=0; i<=CNF; i++) T = substr ($0, 10+i*7, 7) TMP = 100 - (T + T + T + T + T + T + T + T... (24 Replies)
Discussion started by: am24
24 Replies
vmsish(3pm)						 Perl Programmers Reference Guide					       vmsish(3pm)

NAME
vmsish - Perl pragma to control VMS-specific language features SYNOPSIS
use vmsish; use vmsish 'status'; # or '$?' use vmsish 'exit'; use vmsish 'time'; use vmsish 'hushed'; no vmsish 'hushed'; vmsish::hushed($hush); use vmsish; no vmsish 'time'; DESCRIPTION
If no import list is supplied, all possible VMS-specific features are assumed. Currently, there are four VMS-specific features available: 'status' (a.k.a '$?'), 'exit', 'time' and 'hushed'. If you're not running VMS, this module does nothing. "vmsish status" This makes $? and "system" return the native VMS exit status instead of emulating the POSIX exit status. "vmsish exit" This makes "exit 1" produce a successful exit (with status SS$_NORMAL), instead of emulating UNIX exit(), which considers "exit 1" to indicate an error. As with the CRTL's exit() function, "exit 0" is also mapped to an exit status of SS$_NORMAL, and any other argument to exit() is used directly as Perl's exit status. "vmsish time" This makes all times relative to the local time zone, instead of the default of Universal Time (a.k.a Greenwich Mean Time, or GMT). "vmsish hushed" This suppresses printing of VMS status messages to SYS$OUTPUT and SYS$ERROR if Perl terminates with an error status, and allows programs that are expecting "unix-style" Perl to avoid having to parse VMS error messages. It does not suppress any messages from Perl itself, just the messages generated by DCL after Perl exits. The DCL symbol $STATUS will still have the termination status, but with a high-order bit set: EXAMPLE: $ perl -e"exit 44;" Non-hushed error exit %SYSTEM-F-ABORT, abort DCL message $ show sym $STATUS $STATUS == "%X0000002C" $ perl -e"use vmsish qw(hushed); exit 44;" Hushed error exit $ show sym $STATUS $STATUS == "%X1000002C" The 'hushed' flag has a global scope during compilation: the exit() or die() commands that are compiled after 'vmsish hushed' will be hushed when they are executed. Doing a "no vmsish 'hushed'" turns off the hushed flag. The status of the hushed flag also affects output of VMS error messages from compilation errors. Again, you still get the Perl error message (and the code in $STATUS) EXAMPLE: use vmsish 'hushed'; # turn on hushed flag use Carp; # Carp compiled hushed exit 44; # will be hushed croak('I die'); # will be hushed no vmsish 'hushed'; # turn off hushed flag exit 44; # will not be hushed croak('I die2'): # WILL be hushed, croak was compiled hushed You can also control the 'hushed' flag at run-time, using the built-in routine vmsish::hushed(). Without argument, it returns the hushed status. Since vmsish::hushed is built-in, you do not need to "use vmsish" to call it. EXAMPLE: if ($quiet_exit) { vmsish::hushed(1); } print "Sssshhhh...I'm hushed... " if vmsish::hushed(); exit 44; Note that an exit() or die() that is compiled 'hushed' because of "use vmsish" is not un-hushed by calling vmsish::hushed(0) at runtime. The messages from error exits from inside the Perl core are generally more serious, and are not suppressed. See "Perl Modules" in perlmod. perl v5.16.2 2012-10-11 vmsish(3pm)
All times are GMT -4. The time now is 08:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy