How to print specific output only, ie, %.lis - only
search cancel

How to print specific output only, ie, %.lis - only

book

Article ID: 89821

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

How to print specific output only, ie, %.lis - only

Environment

Release: AAMOS499000-8.0-Automic Applications Manager-OS400 Agent
Component:

Resolution

Symptoms

When trying to send specific files to your printer only you end up getting al output files as well as the ones you wish to print(i.e. .lis files).


Cause

You need to set up the script on your output device to specifically print only these files.


Resolution

You can set up the output interface for your output device using the following:

ext=`echo $1|cut -f2 -d"."`
if [ "$ext" = "lis" ]; then
  exit 0
fi

This will print just the .lis files


If they want something more dynamic, they could add a parameter to the Output Device Interface and pass a regular expression.
On Unix there is a "expr" command that can evaluate expressions.
 
Example Match: it returns zero.
expr /opt/uc4/test.txt : ".*\.txt"
echo $?
0
 
Example No Match: it returns one.
expr /opt/uc4/test.txt : ".*\.lis"
echo $?
1