Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Picking problem with printers Post 302494013 by enkei17 on Friday 4th of February 2011 01:19:19 PM
Old 02-04-2011
search_printer.sh
Code:
 
procSleep=`ps -ef | grep batch | grep  'sleep 26' | grep -v grep| wc -l `
if test $procSleep -eq 0
then
    procSleep=`ps -ef | grep batch | grep  Imp_Picking_Desa| grep -v grep| wc -l `
fi
export procSleep
echo $procSleep
      ;;
   Desa) 
procSleep=`ps -ef | grep batch | grep  'sleep 27' | grep -v grep| wc -l `
if test $procSleep -eq 0
then
    procSleep=`ps -ef | grep batch | grep  Imp_Picking_Prod | grep -v grep| wc -l `
fi
export procSleep
echo $procSleep
      ;;
   Prod)

eje_ImpPicking.sh


Code:
 
base=$1
case $base in 
      xile8) 
while true
do
  /home/batch/picking/Imp_Picking_Desa 2>err_reg.txt
  if [ $? != 0 ]
  then
    exit 0
  fi
  sleep 25
done
        ;;
      Desa)   
while true
do
  /home/batch/picking/Imp_Picking_Prod 2>err_pob.txt
  if [ $? != 0 ]
  then
    exit 0
  fi
  sleep 26
done
        ;;
      Prod)

The source is place and usable and this script start with a menu, perm and password are okey, because the script work but randomly stop.

Thank you agaian
 

10 More Discussions You Might Find Interesting

1. Solaris

Problem defining remote printers on solaris 10

Good morning, I have a server with solaris 10 that I want to intall remote printers. I started lpsched deamon without problems with command: svcadm enable application/print/server I want to install printers that are defined locally on print server, so: lpadmin -p <device> -s <print... (2 Replies)
Discussion started by: bonovox
2 Replies

2. UNIX for Advanced & Expert Users

Using awk : picking specified columns

Hi, I would like to get some specific fields from one long line. My line looks like CcnCDRFile0-8535123473201007170536_2010-07-20_17:06:02:,,9963387265,,,,,00720141432,,+0.310,+79.255,+78.945,,,,1492,,,,0,... (1 Reply)
Discussion started by: kkarthik_kaja
1 Replies

3. Shell Programming and Scripting

need help on picking a right book

hi, I'm searching for a perfect book to learn awk programming, i started with sed&awk book, but i think this book might be outdated as it is written way back in 97 and also it doesn't have many examples. So, I thought of getting some advice from the experts here. Pls suggest me some books. ... (1 Reply)
Discussion started by: dvah
1 Replies

4. Shell Programming and Scripting

Picking matching strings

I have a list of file names. However in some instances I might have a "-" at the beginning of the filename or an "=". For example I might have something like this set Lst = "file1 file2 file3 -file4 file5=" I want to pick up the ones having "-" at the beginning or "=" and store them in... (22 Replies)
Discussion started by: kristinu
22 Replies

5. Shell Programming and Scripting

awk not picking up /PP SIZE/

for vgls in `lsvg` do lsvg $vgls | awk '/^VOLUME GROUP/ { printf "%s ", $3 } /PP SIZE/ { S=$6 } /TOTAL PPs/ { printf "%d ", $6*S/1024 } /FREE PPs/ { print $6*S/1024 } ' done This returns /TOTAL PPs/ and /FREE PPs/ fine, but not /PP SIZE/. Please advise. (11 Replies)
Discussion started by: Daniel Gate
11 Replies

6. Solaris

Problem in setting up printers

Hi, We are facing an issue while setting up printers in solaris 5.10 . We have Oracle EBS installed over it. We have configured the printer and when we try printing a page from EBS it is printing fine. But the problem arises when we print two copies of the page. The first page is printing fine... (5 Replies)
Discussion started by: Srinathkiru
5 Replies

7. Shell Programming and Scripting

Picking values from a file.

Hi, I have a file which contains values in this format. abc cde fgh ijk lmn opq rst uvw The user will pass the required parameter from the command line. My requirement is that script should pick the values passed by the user and the next value in the next line. Like if the user... (10 Replies)
Discussion started by: arijitsaha
10 Replies

8. Programming

Python:Picking values from a table

Hi I trying to write a python script that executes a command to screen scrub results below I will appreciate it very much if you can help me with a python script that can pick the percentage USAGE in the second column based on the supplied queue number in the first column Thanks in advance. ... (2 Replies)
Discussion started by: kaf3773
2 Replies

9. Shell Programming and Scripting

Picking up files conditionally

Hi I have a scenario: I have a directory say DIR1 (no sub directories) and have few files in that directory as given below: app-cnd-imp-20150820.txt app-cxyzm-imp-20150820.txt app-petco-imp-20150820.txt app-mobility-imp-20150820.txt app-mobility-imp-20150821.txt... (7 Replies)
Discussion started by: Saanvi1
7 Replies

10. UNIX for Beginners Questions & Answers

Cherry picking with sed?

#!/bin/bash shuffle() { Deck=$(shuf -e {2,3,4,5,6,7,8,9,T,J,Q,K,A}{H,S,D,C}) } PH=(6H 9S KC) # playerhand CH=(JD 4D) # computerhand AC=2S # activecard shuffle echo $Deck I am unsure about how to proceed. I want to reshuffle a deck but without the cards in... (3 Replies)
Discussion started by: cogiz
3 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 05:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy