Sponsored Content
Full Discussion: Simply shell script question
Top Forums Shell Programming and Scripting Simply shell script question Post 76958 by vgersh99 on Friday 1st of July 2005 03:37:28 PM
Old 07-01-2005
Quote:
Originally Posted by blowtorch
Won't it be better to use the 'expr' command everywhere, so that the script remains portable even to older systems or systems without ksh?
why not - just code everything in Bourne [#!/bin/sh] [if you really enjoy pain]
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

A shell script question

Hi, I have a file say xmldir.conf. This is a flat file which contains the data in specific format not other then this. The format is /backup/surjya/mvfile,noeof /backup/surjya/mdbase,eof /backup/surjya/mdbaseso /backup/surjya/trial,hoeof /backup/surjya/test,eof The field before "," is... (2 Replies)
Discussion started by: surjyap
2 Replies

2. Shell Programming and Scripting

shell script question

I am using ksh. There is a report having amounts in the following format, 34343.67- 2343.45 23434.89- I want to sum up all the amounts. For this I first need to find out if there is a minus sign at the end and prefix it before summing up. How to achieve this? I thought of using an... (2 Replies)
Discussion started by: tselvanin
2 Replies

3. UNIX for Dummies Questions & Answers

Linux Shell Question: how to print the shell script name ?

Suppose I have a script named "sc.sh" in the script how to print out its name "sc.sh"? (3 Replies)
Discussion started by: meili100
3 Replies

4. Shell Programming and Scripting

Shell script question

HI, i would like to ask you several question regarding a shell ( #!/bin/sh) i need to make a program that able to do : 1.Accept the name of a logle as the sole command line argument 2.search the specied logle for lines that have been added since the previous search. 3. construct an e-mail... (1 Reply)
Discussion started by: grandios
1 Replies

5. Programming

question on shell script

when i run a shell script i have to type ./my_prog and the first line of my_prog has to have #!/usr/bin/env bash how do i change it to i only have to type my_prog to run it? (4 Replies)
Discussion started by: omega666
4 Replies

6. Homework & Coursework Questions

question on shell script

hiiiiiiiiiiiii,,I found an error on my following script but couldnt find it!!! Can you please help me as soon as possible?! echo "enter a number " read n i=0 first=0 second=1 result=0 prime="true" echo –n " $first $second " while do result=`expr $first + $second` first=$second... (10 Replies)
Discussion started by: moonlips
10 Replies

7. Shell Programming and Scripting

Simply question about capturing output to /dev/tty

Suppose another person wrote the following one-line shell script: echo $RANDOM > /dev/tty QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable? QUESTION #2: How can this be done in a cron job? Specific code, whether in ksh or... (1 Reply)
Discussion started by: Paul R
1 Replies

8. Shell Programming and Scripting

Shell script question

daily few files will be available in one directories /azure/file and it should be moved to other directories /azure/file/recent directories if I run my script. azure/files> ll *7847* N7847.TXTFILE N7847.DMNFILE Once the script is triggered the above file should be moved to the... (3 Replies)
Discussion started by: ramkumar15
3 Replies

9. Shell Programming and Scripting

Shell script question

I am getting error files missing. can anyone tell me I can able to read the file. Can you tell what the other part does? xargs -i test -f {} cat $S.file | uniq | xargs -i test -f {} || error_func "files(s) missing!" (4 Replies)
Discussion started by: ramkumar15
4 Replies

10. Shell Programming and Scripting

Shell script question

I am not sure which is the better way for the below shell script. I need to find the below process running and sent it to the desired user. please let me know which is most feasible right way. ps -ef | grep "Server" > /shome/kk/text.txt cat /shome/kk/text.txt| mail -s "Email... (5 Replies)
Discussion started by: ramkumar15
5 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 11:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy