Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Basic number checking problem Post 302354972 by funksen on Monday 21st of September 2009 05:36:44 AM
Old 09-21-2009
yep you are right, I expected an input of one string without space

the loop is not necessary, thought he want to check three inputs
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sequence number checking

Hi there, I'm wanting to produce a shell script that will check through some file names and identify a skip in sequence (four digit seq num in file name). I have played on the idea of havng a file that has a sorted list of file names which I can read line at a time and cut out the sequence... (1 Reply)
Discussion started by: nhatch
1 Replies

2. Shell Programming and Scripting

checking jump sequence number (part2)

The following script have some bug...can you all help me: #!/bin/sh start=1 for file_number in `ls -1 /appl/CH_DATA/archive/list1/CACHE/CDBACKUPFILEJohn*.archived | sort | cut -c 48,49,50,51` do if ; then # this is the first pass of the loop, so we've got nothing to compare start=0... (3 Replies)
Discussion started by: happyv
3 Replies

3. Shell Programming and Scripting

checking invoice number not correct

hello, I have the following script to check the invoice number is in order or not. However, it cannot show out the correct information. My expect output show below and I would like to only list out the NOT IN SEQUENCE inovice number (not included "ok") #!/bin/sh start=1 for file_number in... (8 Replies)
Discussion started by: happyv
8 Replies

4. Shell Programming and Scripting

checking the smallest and largest number

Hi All, My script is reading a log file line by line log file is like ; 19:40:22 :INFO Total time taken to Service External Request---115ms 19:40:25 DEBUG : Batch processed libdaemon.x86_64 0-0.10-5.el5 - u 19:40:22 INFO Total time taken to Service External Request---20ms 19:40:24... (4 Replies)
Discussion started by: subin_bala
4 Replies

5. Shell Programming and Scripting

Checking for proper number of files in dir

Using Solaris 10 and sh. I have three files. mydirs.txt /dir1/dir2/dir3 /dir4/dir5/dir6 mydirshave.txt 1 2 mydirsshouldhave.txt 2 2 For each directory listed in mydirs.txt I should have the number of files equal to mydirshouldhave.txt. But using -ls |wc -l- on the dirs I get what... (2 Replies)
Discussion started by: crowman
2 Replies

6. UNIX for Dummies Questions & Answers

checking if parameter passed is a number

I have written a function that fills an array and another function where if a parameter is supplied it will jump to that part of the array and cat it to the screen. I need to put in some checks to make sure the parameter supplied is firstly a number and then not a number great than the length of... (2 Replies)
Discussion started by: magnia
2 Replies

7. Homework & Coursework Questions

checking for number of arguments.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Your script must check for the correct number of arguments (one argument). If somebody tries to invoke the... (1 Reply)
Discussion started by: brooksie91
1 Replies

8. Shell Programming and Scripting

checking a number

ok im trying to find out how many cars a user enters. Its giving me an error message of "integer expression expected" Basically if i enter any number over 0 (zero) it should continue read -p "How many cars:" carsn test $cars -ge 1 test $? -ne 0 && read -p "Invalid number.... (8 Replies)
Discussion started by: gangsta
8 Replies

9. Shell Programming and Scripting

Checking variable with specific string and stripping number from it.

I am parsing a file and I get differnt results everytime. Sometimes I get 12s sometimes I get 54m and sometime 3h.. v1=12s or v1=54m or v1=3h 12s - 12 seconds 54m - 54 minutes 3h - 3 hour I have to write a script in such a way that it whenever v1 is in minutes, I should strip "m"... (14 Replies)
Discussion started by: jayeshpatel
14 Replies

10. Shell Programming and Scripting

Checking number of commas in each line.

Hi All, I am checking whether each line is having "n" number of commas or nor. In case not then I need to exit the process. I tried cat "$TEMP_FILE" | while read LINE do processing_line=`expr $processing_line + 1` no_of_delimiters=`echo "$LINE" | awk -F ',' '{ print NF }'` if ... (4 Replies)
Discussion started by: Anupam_Halder
4 Replies
RLAM(1) 						      General Commands Manual							   RLAM(1)

NAME
rlam - laminate records from multiple files SYNOPSIS
rlam [ -tS ][ -u ][ -iaN | -ifN | -idN | -iiN | -iwN | -ibN ] input1 input2 .. DESCRIPTION
Rlam simply joins records (or lines) from multiple inputs, separating them with the given string (TAB by default). Different separators may be given for different files by specifying additional -t options in between each file name. Note that there is no space between this option and its argument. If none of the input files uses an ASCII separator, then no end-of-line character will be printed, either. An input is either a stream or a command. Commands are given in quotes, and begin with an exclamantion point ('!'). If the inputs do not have the same number of lines, then shorter files will stop contributing to the output as they run out. The -ia option may be used to specify ASCII input (the default), or the -if option may be used to indicated binary IEEE 32-bit floats on input. Similarly, the -id and -ii options may be used to indicate binary 64-bit doubles or integer words, respectively. The -iw option specifies 2-byte short words, and the -ib option specifies bytes. If a number is immediately follows any of these options, then it indi- cates that multiple such values are expected for each record. For example, -if3 indicates three floats per input record for the next named input. In the case of the -ia option, no number indicates one line per input record, and numbers greater than zero indicate that many characters exactly per record. For binary input formts, no number implies one value per record. For anything other than EOL-separated input, the default tab separator is reset to the empty string. A hyphen ('-') by itself can be used to indicate the standard input, and may appear multiple times. The -u option forces output after each record (i.e., one run through inputs). EXAMPLE
To join files output1 and output2, separated by a comma: rlam -t, output1 output2 To join a file with line numbers (starting at 0) and its reverse: cnt `wc -l < lam.c` | rlam - -t: lam.c -t '!tail -r lam.c' To join four data files, each having three doubles per record: rlam -id3 file1.dbl file2.dbl file3.dbl file4.dbl > combined.dbl AUTHOR
Greg Ward SEE ALSO
cnt(1), histo(1), neaten(1), rcalc(1), tabfunc(1), total(1) RADIANCE
7/8/97 RLAM(1)
All times are GMT -4. The time now is 02:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy