Sponsored Content
Top Forums Shell Programming and Scripting Confirming Syntax - IF statement. Post 302178677 by Klashxx on Wednesday 26th of March 2008 06:31:54 AM
Old 03-26-2008
Yep , it will produce the same result.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

syntax error on if statement

Hi, Can you please help me with this one: I write an "if" statement, something like this: if then echo "big file" else echo "normal file" and I get an error: `'then is not expected Thanks in advance (6 Replies)
Discussion started by: apenkov
6 Replies

2. UNIX for Dummies Questions & Answers

if statement code syntax

Hi, can someone please tell me what is wrong with this code? I just want it to check if the file size is greater than 2000kb. if Thanks! ---------- Post updated at 09:23 PM ---------- Previous update was at 09:21 PM ---------- I should probably post the full code: #!/bin/sh... (9 Replies)
Discussion started by: Bengel
9 Replies

3. Shell Programming and Scripting

Syntax error in script with if statement

I'm working on a function in a shell script I'm writing that will eventually take in and print out a list of vendor names and aliases (for my work) Here's the function in question: addvendorandalias () { echo echo -n 'Would you like to create a new vendor list (y or n)? ' read answer... (3 Replies)
Discussion started by: Straitsfan
3 Replies

4. AIX

Confirming command

Guy's I'm trying to create script to execute some critical commands in AIX like the below ... stopsrc -s qdaemon stopsrc -s sshd stopsrc -s lpd stopsrc -s nfsd I want between each command to ask me like this " are you sure to stop qdaemon " " are you sure to stop ssh" " are... (3 Replies)
Discussion started by: Mr.AIX
3 Replies

5. Shell Programming and Scripting

complex if statement syntax without using 'if ..' keyword in ksh.

It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use .. && <statement> || <statement> that perfectly replaces.. if ; then <statement> else <statement> fi Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Discussion started by: kchinnam
4 Replies

6. Shell Programming and Scripting

Help with if statement syntax

Hi, Is there a way to compare the value in if condition with a list of values. eg . if ] then echo "it's a mammal" else echo "its not" fi Thanks! (8 Replies)
Discussion started by: neil.k
8 Replies

7. Shell Programming and Scripting

If statement Syntax error

Hi Can you please tell me what is wrong with this line: if && ]; then basically i want to check if x = 12 and F (Filename) end with 'g'. But it is throwing syntax error. (7 Replies)
Discussion started by: rtagarra
7 Replies

8. Shell Programming and Scripting

[Solved] 0403-057 Syntax error for if statement

I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values tstmb.sh: 1.5321e+08: 0403-057 Syntax error Below is my code snippet. #!/bin/ksh set -x TODAY=$(date +%y%m%d) for file in $(ls -rt *.log | tail... (11 Replies)
Discussion started by: kiran1112
11 Replies

9. Shell Programming and Scripting

Help with if statement syntax in shell script

I want to make the file test condition a variable ($Prmshn in code below). My goal is to use something like the first three unsuccessful if statetments since the 'if #!/bin/ksh test_input() { Prmshn=${1} InFLNm=${2} ifReq="-$Prmshn $InFLNm" #the following three if statments fail: #if ] ;... (10 Replies)
Discussion started by: ms63707
10 Replies

10. UNIX for Beginners Questions & Answers

Syntax for if statement

I'm new to unix and the command line and am trying to learn different commands. I have a file (teledir.txt) that contains a name and phone number for 3 different people. I am writing a script that is to take two positional parameters and I typed out how it should behave: if <name and number... (1 Reply)
Discussion started by: Eric7giants
1 Replies
jscal(1)						      General Commands Manual							  jscal(1)

NAME
jscal - joystick calibration and remapping program SYNOPSIS
jscal [options] <device-name> DESCRIPTION
jscal calibrates joysticks and maps joystick axes and buttons. Calibrating a joystick ensures the positions on the various axes are cor- rectly interpreted. Mapping axes and buttons allows the meanings of the joystick's axes and buttons to be redefined. On Debian systems the calibration settings can be stored and later applied automatically using the jscal-store command. OPTIONS
-c, --calibrate Calibrate the joystick. -h, --help Print out a summary of available options. -s, --set-correction <nb_axes,type,precision,coefficients,...> Sets correction to specified values. For each axis, specify the correction type (0 for none, 1 for "broken line"), the precision, and if necessary the correction coefficients ("broken line" corrections take four coefficients). -u, --set-mappings <nb_axes,axmap1,axmap2,...,nb_buttons,btnmap1,btnmap2,...> Sets axis and button mappings. n_of_buttons can be set to 0 to remap axes only. -t, --test-center Tests if the joystick is correctly calibrated. Returns 2 if the axes are not calibrated, 3 if buttons were pressed, 1 if there was any other error, and 0 on success. -V, --version Prints the version numbers of the running joystick driver and that which jscal was compiled for. -p, --print-correction Prints the current correction settings. The format of the output is a jscal command line. -q, --print-mappings Prints the current axis and button mappings. The format of the output is a jscal command line. CALIBRATION
Using the Linux input system, joysticks are expected to produce values between -32767 and 32767 for axes, with 0 meaning the joystick is centred. Thus, full-left should produce -32767 on the X axis, full-right 32767 on the X axis, full-forward -32767 on the Y axis, and so on. Many joysticks and gamepads (especially older ones) are slightly mis-aligned; as a result they may not use the full range of values (for the extremes of the axes), or more annoyingly they may not give 0 when centred. Calibrating a joystick provides the kernel with informa- tion on a joystick's real behaviour, which allows the kernel to correct various joysticks' deficiencies and produce consistent output as far as joystick-using software is concerned. jstest(1) is useful to determine whether a joystick is calibrated: when run, it should produce all 0s when the joystick is at rest, and each axis should be able to produce the values -32767 and 32767. Analog joysticks should produce values in between 0 and the extremes, but this is not necessary; digital directional pads work fine with only the three values. SEE ALSO
ffset(1), jstest(1), jscal-store(1). AUTHORS
jscal was written by Vojtech Pavlik and improved by many others; see the linuxconsole tools documentation for details. This manual page was written by Stephen Kitt <steve@sk2.org>, for the Debian GNU/Linux system (but may be used by others). jscal Jul 11, 2010 jscal(1)
All times are GMT -4. The time now is 09:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy