Sponsored Content
Top Forums Shell Programming and Scripting simple shell script with elif and for nexxt Post 302358840 by Scott on Monday 5th of October 2009 02:19:48 AM
Old 10-05-2009
Hi.

All of your if / elif statements are wrong.

The = should have spaces before and after.

i.e.
bash code:
  1. if [ "$Z" = "y" ] ; then

Is this "i" after "y" intended:
bash code:
  1. if [ "$Z" = "y"i ] ; then
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

A Simple shell Script

Hi there. im creating a shell script which helps me perform simple functions when i use it, but there are still two functions which i cannot figure out yet. 1) how can I count the number of occurences of a certain file within the whole file system? (filename supplied as an argument.) 2) How... (2 Replies)
Discussion started by: provo
2 Replies

2. Shell Programming and Scripting

need a simple shell script

Hi, I am new to unix as well as shell programming. Any body can provide me a simple shell script which should copy/transfer/fetch a file(using FTP)from remote server to local system.and it should log the details when it was fetched.If there is any error,the error msg should log in log... (1 Reply)
Discussion started by: Mar1006
1 Replies

3. Shell Programming and Scripting

Please Help On Simple Shell Script

This is an assignment I have to do everyone but I was viewing the threads and I assumed that I could write this assignment simpler than what My instructor is directing.. Here is the Assignment This shell script has the following specifications: - It must be named: "printpasswd." - It must... (1 Reply)
Discussion started by: dmosheye
1 Replies

4. UNIX for Dummies Questions & Answers

IF THEN ELIF question in BOURNE SHELL

Hi, I get an error when executing this sample script. #!bin/sh if ; then echo "you need to enter the release as the first parameter" elif ; then echo "HI how are you ABC" echo "Hi how are you XYZ" echo " hi how are you all" else echo "using the $1 as input parameter" fi i get... (4 Replies)
Discussion started by: arun_st
4 Replies

5. Shell Programming and Scripting

simple shell - how to get a parameter typed in a shell script

Hi, I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java myJavaprogram I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe... (4 Replies)
Discussion started by: cmitulescu
4 Replies

6. Shell Programming and Scripting

Simple Shell Script

Hello Friends, I am writing a shell script which will grab a file if it exists and copies it to another folder and will append with current date. I have written but gives me error, plz help: -------------------------------------------- #!/usr/bin/sh source=/home/dev4rice/naveen/test1... (4 Replies)
Discussion started by: ganesh123
4 Replies

7. Shell Programming and Scripting

Help me with simple shell script.

Hello forum members, I have to redirect a output of command into a text file inside a script file but iam getting an errors.so please see below script and suggest me for corrections. #!/bin/ksh read IP_ADD echo nslookup $IP_ADD 2>&1| tee log1.txt cat /amex/gcst/siva/Testr/log1.txt... (6 Replies)
Discussion started by: rajkumar_g
6 Replies

8. Shell Programming and Scripting

Simple Shell Script? Someone help?

Write a shell script which adds up 10 numbers entered by the user and displays the result to the screen. You must use the read command to obtain the numbers from the user. Im a nooby noob (2 Replies)
Discussion started by: LinuxNubBrah
2 Replies

9. Shell Programming and Scripting

Simple Shell Script! Almost Done!

Hello, I am creating a shell script and I am almost done. I have certain things I want done in the shell but don't know how to finish it properly. Here is what I am aiming to do. I am aiming to have a shell that takes at least 3 parameters. The first two are the two words to replace (the... (3 Replies)
Discussion started by: ShellsNewb
3 Replies

10. Shell Programming and Scripting

Help on simple shell script

Hello, I am running openmediavault on my Raspberry and I would like to use it as a backup FTP server of snapshots taken from my IP cams. So I get the network recorder to upload every 3 seconds a snapshot to the Raspberry. Everything works perfectly. I would need now a simple script that... (5 Replies)
Discussion started by: dcaccount
5 Replies
gamma4scanimage(1)					   SANE Scanner Access Now Easy 					gamma4scanimage(1)

NAME
gamma4scanimage - create a gamma table for scanimage SYNOPSIS
gamma4scanimage gamma [shadow [highlight [maxin [maxout]]]] DESCRIPTION
The tool gamma4scanimage creates a gamma table in the format expected by scanimage. You can define a gamma, a shadow and a highlight value. You also can specify the size (maxin) and maximum output value (maxout) of the gamma table. gamma is a floating point value, neutral value is 1.0, if the value is larger than 1.0 then the image gets brighter. shadow defines the minimum input value that is necessary to create an output value larger than zero. shadow has to be in the range [0..maxin]. Its default value is 0. highlight defines the maximum input value that produces an output value smaller than maxout. highlight has to be in the range [0..maxin], highlight has to be larger than shadow. Its default value is the same as maxin (16383 if not set). maxin defines the size of the gamma table. The size depends on the scanner/backend. If the scanner uses 8 bits gamma input then maxin has to be set to 255, for 10 bits 1023, for 12 bits 4095, for 14 bits 16383. The default is 16383. To find out what value maxin has to be call scanimage with a very large gamma table [0]0-[99999]255 then scanimage prints an error message with the needed size of the gamma table. maxout defines the maximum output value. Take a look at the output of scanimage -h to find out what maxout has to be. The default value is 255. EXAMPLE
scanimage --custom-gamma=yes --gamma-table `gamma4scanimage 1.8 0 11500 16383 255` >image.pnm SEE ALSO
scanimage(1) AUTHOR
Oliver Rauch EMAIL-CONTACT Oliver.Rauch@Rauch-Domain.DE 10 Jul 2008 gamma4scanimage(1)
All times are GMT -4. The time now is 08:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy