Sponsored Content
Top Forums Shell Programming and Scripting How to assign awk values to shell variable? Post 303040835 by RudiC on Thursday 7th of November 2019 01:08:40 PM
Old 11-07-2019
Or (untested)

Code:
read maxlength minlength <<< $( awk '... END {print a, b}')

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read a file and assign the values to a variable

i have a file in this format curyymm PRVYYMM CDDMmmYY bddMmmyy eddMmmyy --------- ------- ------------ ---------- ----------- 0906 0905 09Jun09 01Jun09 30Jun09 ----------- --------- ------------ ------------ ----------- i need to read the... (5 Replies)
Discussion started by: depakjan
5 Replies

2. Shell Programming and Scripting

Read the csv file and assign the values in to variable

I have a csv file with the values seperated by commas.I want to extract these values one by one and assign to a variable using shell script.Any ideas or code? (11 Replies)
Discussion started by: rajbal
11 Replies

3. Shell Programming and Scripting

assign awk's variable to shell script's variable?

Dear All, we have a command output which looks like : Total 200 queues in 30000 Kbytes and we're going to get "200" and "30000" for further process. currently, i'm using : numA=echo $OUTPUT | awk '{print $2}' numB=echo $OUTPUT | awk '{print $5}' my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies

4. Shell Programming and Scripting

Assign values to variable

Hi Masters, I want to assign the values of one variable to another variable. Here the varaible name 'var' is dynamic. I know the values of V_2 and U_3, but If the i/p of TYPE is 'U' and the NO is 3, then I want to assign the values of U_3 to var. How we can achieve it? TYPE="U"... (4 Replies)
Discussion started by: ecearund
4 Replies

5. UNIX for Dummies Questions & Answers

using awk iteratively in a script to assign variable values

I have a log file that has certain fields that I want to evaluate, and depending on the value in those fields, I want to put the value of a different field in that line in a particular variable that I'll use later on down the log file. Sort of like setting a switch to change what I do with a bunch... (5 Replies)
Discussion started by: pts2
5 Replies

6. UNIX for Dummies Questions & Answers

How to assign values to variable in given scenario

Hi i have one variable like DIR="f1 f2" in config file in my script i have one runtime variable LFILE="DIR" now i want to use $DIR in my script by using LFILE that is i dont want to use DIR dirctly i am extracting DIR by some other means. Config file : DIR="f1 f2" Script: LFILE="DIR" i... (3 Replies)
Discussion started by: sriram_gec
3 Replies

7. Shell Programming and Scripting

Passing values from awk to shell variable

I am writing a script where I need awk to test if two columns are the same and shell to do something if they are or are not. Here is the code I'm working with: @ test = 0 ... test = `awk '{if($1!=$2) print 1; else print 0}' time_test.tmp` #time_test.tmp holds two values separated by a space... (3 Replies)
Discussion started by: Malavin
3 Replies

8. Shell Programming and Scripting

Assign comma separated values to a variable

Hi All, I wrote a database command that queries our application and outputs a whole bunch of values to a text file. I need to assign the output to two values. Here is a sample of the output: valueOne, checkOne valueTwo, checkTwo valueThree, checkThree I would like... (9 Replies)
Discussion started by: jeffs42885
9 Replies

9. Shell Programming and Scripting

Assign Values to a Variable in While Loop and Update the File

Hello, Could anyone please help me with Assigning a value to variable and then updating the value in the original file IFS='|' while read -r Serial_ID JOB_NAME STATUS do if then echo "Perform Fuctions" ???Assign STATUS to COMPLETED and Update File??? done <File (7 Replies)
Discussion started by: infernalhell
7 Replies

10. UNIX for Beginners Questions & Answers

How can I assign awk's variable to shell script's variable?

I have the following script, and I want to assign the output ($10 and $5) from awk to N and L: grdinfo data.grd | awk '{print $10,$5}'| read N L output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
sane-teco1(5)							File Formats Manual						     sane-teco1(5)

NAME
sane-teco1 - SANE backend for TECO / RELISYS scanners DESCRIPTION
The sane-teco1 library implements a SANE (Scanner Access Now Easy) backend that provides access to some TECO SCSI flatbed scanners. This backend should be considered beta-quality software! TECO scanners are sold under various brands like RELISYS, PIOTECH, TRUST. This backend may or may not support yours. The scanners that should work with this backend are: Vendor Model TECO model status ---------------------- -------------- ----------- Relisys AVEC 2400 VM3520 tested Relisys AVEC 2412 VM3520+ untested Relisys AVEC 4800 VM4530 untested Relisys AVEC 4816 VM4530+ untested Relisys RELI 2400 VM3530 untested Relisys RELI 2412 VM3530+ tested Relisys RELI 2412 VM3530+ untested Relisys RELI 4816 VM4540 untested Relisys RELI 4830 VM4542 tested Relisys RELI 9600 VM6530 untested Relisys RELI 9612 VM6530* untested Relisys RELI 9624 VM6530+ untested Relisys RELI 9630 VM6540 untested Relisys RELI DS15 VM3440 untested Relisys RELI DS6 VM3420 untested Dextra DF-600P VM3510 tested Dextra DF-4830T VM4542 untested Dextra DF-1200T+ VM3530+ untested Dextra DF-9624 VM6530+ untested Note that the untested scanner will not be directly supported. You should contact the author for that. The TECO VM number can usually be found at the back of the scanner. It is also part of the FCC ID. "sane-find-scanner -v" will also show the scsi inquiry, and if it is a TECO scanner, the name will be there too. The options the backend supports can either be selected through command line options to programs like scanimage or through GUI elements in xscanimage or xsane. If you have any success with a scanner not listed here, or if you have any strange behavior, please report to the backend maintainer or to the SANE mailing list. Valid command line options and their syntax can be listed by using scanimage --help -d teco1 Scan Mode --mode selects the basic mode of operation of the scanner valid choices are Black & White , Grayscale and Color The Black & White mode is black and white only (1 bit). Grayscale will produce 256 levels of gray (8 bits). Color will produce a 24 bits color image. --resolution selects the resolution for a scan. The scanner can do all resolutions between 1 and 600, in increments of 1. Geometry options -l -t -x -y control the scan area: -l sets the top left x coordinate, -t the top left y coordinate, -x selects the width and -y the height of the scan area. All parameters are specified in millimeters by default. Enhancement options --custom-gamma (color mode only) allows the user to specify a gamma table (see the next 3 parameters). --red-gamma-table (color mode only) can be used to download a user defined gamma table for the red channel. The table must be 256 bytes long. --green-gamma-table (color mode only) can be used to download a user defined gamma table for the green channel. The table must be 256 bytes long. --blue-gamma-table (color mode only) can be used to download a user defined gamma table for the blue channel. The table must be 256 bytes long. --dither (Black & White only) select the dither mask to use. Possible values are Line art , 2x2 , 3x3 , 4x4 bayer , 4x4 smooth , 8x8 bayer , 8x8 smooth , 8x8 horizontal and 8x8 vertical --preview requests a preview scan. The resolution used for that scan is 22 dpi and the scan area is the maximum allowed. The scan mode is user selected. The default is "no". CONFIGURATION FILE
The configuration file /etc/sane.d/teco1.conf supports only one information: the device name to use (eg /dev/scanner). FILES
/usr/lib/sane/libsane-teco1.a The static library implementing this backend. /usr/lib/sane/libsane-teco1.so The shared library implementing this backend (present on systems that support dynamic loading). ENVIRONMENT
SANE_DEBUG_TECO1 If the library was compiled with debug support enabled, this environment variable controls the debug level for this backend. E.g., a value of 128 requests all debug output to be printed. Smaller levels reduce verbosity. LIMITATIONS
The windows TWAIN driver has many more options than this SANE backend. However they are only software adjustments. This backend only imple- ments what the scanner can support. BUGS
None known. SEE ALSO
sane-scsi(5), scanimage(1), xscanimage(1), xsane(1), sane(7) AUTHOR
The package is actively maintained by Frank Zago. http://fz.eryx.net/sane/#teco CREDITS
Thanks to Gerard Delafond for the VM4542 support. Thanks to Jean-Yves Simon for the VM3510 support. August 30th, 2002 sane-teco1(5)
All times are GMT -4. The time now is 04:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy