Sponsored Content
Top Forums Shell Programming and Scripting Why result is wrong here ? whether break statement is wrong ? Post 302778317 by Jotne on Sunday 10th of March 2013 12:20:27 PM
Old 03-10-2013
I do not understand what range you like.
Print output example (how you like the result to be)
Also add what the criteria you have to get this output.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

What's wrong with this simple statement?

I know that this is a ridiculously simple statement, but I am getting an error when I execute it, and I can't figure out what it is. Can anyone point me in the right direction? #!/bin/ksh integer dateMonth=0 integer intZero=0 if then dateMonth = 1 fi echo $dateMonth (7 Replies)
Discussion started by: mharley
7 Replies

2. Shell Programming and Scripting

whats wrong with this find statement ?

cmd="find /a/technologies -name '*.jar' | grep \"Tuning/specificloader/lib\"" echo $cmd for index in `$cmd` do SL_JARS="${SL_JARS}:${index}" done gives error ==> find: paths must precede expression Usage: find but for index in... (2 Replies)
Discussion started by: crackthehit007
2 Replies

3. Shell Programming and Scripting

Something is wrong with this switch( case statement.

I started writing a script to save the files from a camera I got the other day, which mounts in /Volumes , and I got into it and started building this menu. The only problem is that the switch case is coming up as a syntax error at the parenthesis after a case. Here is the code: while : do ... (2 Replies)
Discussion started by: snakemasterAK
2 Replies

4. Shell Programming and Scripting

What's wrong with the do statement?

hi guys, here's the code $ cat getsums.sh #!/usr/bin/sh FILENAME=$1 DELIMITER=$2 FIRST_COL=$3 SECOND_COL=$4 SALESDATE_COL=$5 STOREID=$6 UPC=$7 GTIN=$8 PROMOID=$9 echo "" echo ".:Summation Tool:." for FILE in ${FILENAME} do (7 Replies)
Discussion started by: ramneim
7 Replies

5. Shell Programming and Scripting

What is wrong with this awk statement?

echo $line | awk -F, "BEGIN {if(NF==10) && /'"${MONTH}"' '"${DAY}"' '"${TIMEH}:"'/,0 {print $10"-"$4} else {print $13"-"$4}}" if the fields in the line is equal to 10, print the values of this specified fields "$10 and $4". if the fields in the line is anything but 10, print the values of... (5 Replies)
Discussion started by: SkySmart
5 Replies

6. Shell Programming and Scripting

Wrong result return from script

Hi Gurus, I need a script to compare two files: sample file like below: list: cde,file4 cde,file5 def,file6 def,file7 def,file8 abc,file1 abc,file2 abc,file3 acd,file9 acd,file10 tmp file1 file2 file3 file4 (12 Replies)
Discussion started by: ken6503
12 Replies

7. Shell Programming and Scripting

Output result with break line

Hello, I am coding a script to check mysql databases using bash script, I would like to check if the status of a table is not 'OK', will return the table name and do some more actions: check.log table1 OK table2 Some error here table3 ... (5 Replies)
Discussion started by: Abu Rayane
5 Replies

8. Programming

Whats wrong with this If statement?

Hi I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement? Code: if && && then fector=$kk; divide=$DB_SIZE/$kk; echo "factor value:$fector" echo"divide... (1 Reply)
Discussion started by: Gevni
1 Replies

9. UNIX for Beginners Questions & Answers

Whats wrong with this If statement?

Hi I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement? if && && then fector=$kk; divide=$DB_SIZE/$kk; echo "factor value:$fector" echo"divide value:$divide"... (1 Reply)
Discussion started by: Gevni
1 Replies

10. Shell Programming and Scripting

Whats wrong with this If statement?

Hi I am pretty new to bash scripting.I am trying to write the if statement in bash and it give me error. Can you please help me what I am doing wrong in If statement? if && && then fector=$kk; divide=$DB_SIZE/$kk; echo "factor value:$fector" echo"divide value:$divide"... (4 Replies)
Discussion started by: Gevni
4 Replies
LP(1)							      General Commands Manual							     LP(1)

NAME
lp - printer output SYNOPSIS
lp [ option ... ] [ file ... ] DESCRIPTION
Lp is a generalized output printing service. It can be used to queue files for printing, check a queue, or kill jobs in a queue. The options are: -d dest Select the destination printer. If dest is list the currently available printers. In the absence of the destination is taken from the environment variable LPDEST. Destination is the standard output. Destination is line printer port on a 386 machine. -p proc The given processor is invoked. The default processor is which tries to do the right thing for regular text, troff(1) output, or tex(1) output. If no processing is desired may be specified. -q Print the queue for the given destination. For some devices, include printer status. -k Kill the job(s) given as subsequent arguments instead of file names for the given destination. The remaining options may be used to affect the output at a given device. These options may not be applicable to all devices. -c n Print n copies. -f font Set the font (default -H Suppress printing of header page. -i n Select paper input tray. n may be a number 0-9, the word man for the manual feed slot, and/or simplex or duplex to get single or double sided output. Multiple input tray options may be specified if they are separated by commas. -l n Set the number of lines per page to n. -L Print pages in landscape mode (i.e. turned 90 degrees). -m v Set magnification to v. -n n Print n logical pages per physical page. -o list Print only pages whose page numbers appear in the comma-separated list of numbers and ranges. A range n-m means pages n through m; a range -n means from the beginning to page n; a range n- means from page n to the end. -r Reverse the order of page printing. -x v Set the horizontal offset of the print image, measured in inches. -y v Set the vertical offset of the print image, measured in inches. EXAMPLES
eqn paper | troff -ms | lp -dsafari Typeset and print a paper containing equations. pr -l100 file | lp -l100 -fCW.8 Print a file in a small font at 100 lines per page. lp -dstdout /dev/windows/3/window > doc.ps Convert a bitmap to a postscript file. SEE ALSO
lp(8) P. Glick, ``A Guide to the Lp Printer Spooler''. BUGS
Not all options work with all output devices. Any user can kill any job. Lp will accept jobs from BSD style lpdaemons but cannot send jobs to such systems. LP(1)
All times are GMT -4. The time now is 03:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy