Sponsored Content
Top Forums Shell Programming and Scripting Unable to print block of data Post 302884084 by cskumar on Friday 17th of January 2014 11:08:05 AM
Old 01-17-2014
Unable to print block of data

Hi All,

Iam unable to print the below block and getting the error.Can anyone please help me in this.
Code:
 Input Data
eaits001z$ echo "-------LINENO_JOBID_VAL--------${LINENO_JOBID_VAL}---"
-------LINENO_JOBID_VAL--------58167|253473 58169|253473 58171|253473 58179|253473 58180|253473 58181|257311 58183|257311 58185|257311 58187|257311 58192|257311 58196|263935 58198|263935 58200|263935 58202|263935 58207|263935 58211|264359 58212|264360 58215|264360 58217|264360 58219|264360 58227|264360 58229|264360 58230|264487 58231|264488 58234|264488 58236|264488 58238|264488 58246|264488 58248|264488 58249|286343 58251|286343 58253|286343 58255|286343 58260|286343 58264|286469 58266|286469 58268|286469 58270|286469 58275|286469 58279|287226 58281|287226 58283|287226 58285|287226 58290|287226 58294|287351 58296|287351 58298|287351 58300|287351 58305|287351 58309|292485 58311|292485 58313|292485 58315|292485 58320|292485 58324|292754 58326|292754 58328|292754 58330|292754 58335|292754 58339|293116 58341|293116 58343|293116 58345|293116 58350|293116 58354|293150 58356|293150 58358|293150 58360|293150 58365|293150 58369|293207 58371|293207 58373|293207 58375|293207 58380|293207 58384|293241 58386|293241 58388|293241 58390|293241 58395|293241 58399|293486 58401|293486 58403|293486 58405|293486 58410|293486 58414|293501 58416|293501 58418|293501 58420|293501 58425|293501 58429|293521 58431|293521 58433|293521 58435|293521 58440|293521 58444|298297 58446|298297 58448|298297 58450|298297 58455|298297 58459|299130 58461|299130 58463|299130 58465|299130 58470|299130 58474|299428 58476|299428 58478|299428 58480|299428 58485|299428 58489|304171 58491|304171 58493|304171 58495|304171 58500|304171 58504|306320 58506|306320 58508|306320 58510|306320 58515|306320 58519|321170 58521|321170 58523|321170 58525|321170 58530|321170 58534|329122 58536|329122---

Script
for (i=0;i<${#LINENO_JOBID_VAL[@]};i++)
do
      STARTPT=`echo ${LINENO_JOBID_VAL[$i]}|cut -d"|" -f1`
   ENDPT=`echo ${LINENO_JOBID_VAL[$i]}|cut -d"|" -f2`
   if [ ${STARTPT} != "" ] && [ ${ENDPT} == "EOF" ]
   then
     echo "IN SUCCESS CONDITION--"$STARTPT
     nawk -v STPT=$STARTPT 'NR >= STPT { print $0} ' ${BASEPATH}/$FILE|nawk '{ if (match($0,"^[0-9][0-9][0-9][0-9] [A-Z][a-z][a-z] [0-9][0-9]")){ if ($0 !~ /Job-'$MAX_JOB'/) {exit; }else {  print $0; }} print $0}' 
   else
     echo "IN FAILED CONDITION--"$STARTPT"|"$ENDPT
     nawk -v STPT=$STARTPT EDPT=$ENDPT 'NR==STPT,NR==EDPT { print $0} ' ${BASEPATH}/$FILE 
   fi
done

 

10 More Discussions You Might Find Interesting

1. SCO

Non-Root Users Unable to Print

UnixWare 7, Release 7.1.3 We have a customer that has frequent issues with Non-Root users being unable to print. They are able to print w/o issues, but all of the sudden it stops working. The only workaround we have at this point is to reboot the server. It is happening weekly according to... (1 Reply)
Discussion started by: cfshd
1 Replies

2. AIX

Unable to print Cyrillic fonts

Hi All I confifured HP 4250 printer on AIX server..I am unable to print cyrillic fonts prints. Please assist.. (0 Replies)
Discussion started by: kandatihari
0 Replies

3. Shell Programming and Scripting

Unable to set a data to array

Hi All, Iam trying to set the value to the array... Still its not happening Following is the code: #!/usr/bin/ksh filenames="x"; filenames="y"; echo $filenames; echo $filenames; O/P: x x Iam expecting (2 Replies)
Discussion started by: kiranlalka
2 Replies

4. Solaris

NIS slave unable to copy the data bases

Hi, I'm learning for my Solaris 10 sys-admin part 2. I'm now trying to get nis working because for the exercise. I run in to a problem. Setup: Three Systems solaris101 (client) Nothing wrong here havent made any config changes yet. solaris102 (master server) Interfaces ... (1 Reply)
Discussion started by: jld
1 Replies

5. Programming

Unable to publish data

Hi All, In my application, we are using Publish/subscribe model implemented in JAVA and when I implemented it on windows to windows os,it is working fine and able to publish the right data and even when I am trying the same between two different OS i.e between Windows and Solaris sparc or... (1 Reply)
Discussion started by: smartgupta
1 Replies

6. Shell Programming and Scripting

FNR>2 is not working and unable to extract data from a file

Hi, I have a file in windows environment and moved to UNIX through FTP (ASCII format). The file is having with tab delimited file. awk ‘FNR>2' file_cust*.txt >>filnal.txt I have the same file in production; it is working fine with the same procedure. Once we receive the file in windows... (1 Reply)
Discussion started by: onesuri
1 Replies

7. Shell Programming and Scripting

Unable to Print Count

Hi All, I am performing addition of two inetger variables which assigning output to a new variable getting following error. Check1.sh #!/bin/ksh filesrc=/usr/kk/Source1.txt filetgt=/usr/kk/Source2.txt FINAL_COUNTS= `awk '{n++} END {printf "%012d\n",n}' ${filesrc} ${filetgt}`... (3 Replies)
Discussion started by: kmsekhar
3 Replies

8. Shell Programming and Scripting

Unable to print dynamic arguments in for loop

Hi All, I want to pass few dynamic arguments to shell script. The number of arguments differ each time I call the script. I want to print the arguments using the for loop as below. But not working out. for (( i=1; i<=$#; i++ )) do echo $"($i)" done /bin/sh test.sh arg1 arg2 arg3 ... (1 Reply)
Discussion started by: laalesh
1 Replies

9. Shell Programming and Scripting

Unable to retrieve data from shell when connected to Oracle

I am trying to get the data from oracle table to a variable I have tried the below code #/usr/bin/sh echo " I am in correct loop" SPOOL_FILE=/app/scripts/alt.lst sqlplus /nolog <<END_SQL connect bindu/bindu@gis whenever sqlerror exit failure rollback;... (4 Replies)
Discussion started by: Kiransagar
4 Replies

10. Shell Programming and Scripting

Unable to print python array in shell script loop.

I am unable to loop print a python string array in my unix shell script: ~/readarr.sh '{{ myarr }}' more readarr.sh echo "Parameter 1:"$1 MYARRAY= $1 IFS= MYARRAY=`python <<< "print ' '.join($MYARRAY)"` for a in "$MYARRAY"; do echo "Printing Array: $a" done Can you... (10 Replies)
Discussion started by: mohtashims
10 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 01:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy