Sponsored Content
Full Discussion: To replace header name
Top Forums Shell Programming and Scripting To replace header name Post 302993064 by senhia83 on Monday 6th of March 2017 12:02:42 PM
Old 03-06-2017
More generic and untested...

Code:
awk  -v add="hi_"  -F, 'NR==1{for(i=1;i<=NF;i++) $i=add $i}1' OFS=","  file

 

10 More Discussions You Might Find Interesting

1. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

2. Shell Programming and Scripting

awk/sed column replace using column header - help

$ cat log.txt Name Age Sex Lcation nfld alias xsd CC 25 M XYZ asx KK Y BB 21 F XAS awe SS N SD 21 M AQW rty SD A How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column? so that the final output will become: Name Age Sex... (10 Replies)
Discussion started by: jkl_jkl
10 Replies

3. Shell Programming and Scripting

Header Replace characters

Hi, I have a flat file with header with tab delimiter. nbr id name salesid detail num source num jun_2007 jul_2007 aug_2007 sep_2007 ....feb_2008 I need to modify the header for the columns nbr to Id1 jun_2007 to Jun07 jul_2007 to Jul07 aug_2007 to Aug07 sep_2007 to Sep07... (3 Replies)
Discussion started by: umathurumella
3 Replies

4. Shell Programming and Scripting

improve performance - replace $\| with $#@ and remove header and trailer records

Hi All, In my file i need to remove header and trailer records which comes in 1st line and last line respectively. After that i need to replace '$\|' with '$#@'. I am using sed command for this and its taking lot of time. Is there any other command which can be used to improve performance? ... (1 Reply)
Discussion started by: HemaV
1 Replies

5. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

6. Shell Programming and Scripting

Add column header and row header

Hi, I have an input like this 1 2 3 4 2 3 4 5 4 5 6 7 I would like to count the no. of columns and print a header with a prefix "Col". I would also like to count the no. of rows and print as first column with each line number with a prefix "Row" So, my output would be ... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

7. Shell Programming and Scripting

Replace a column with a value by ignoring the header lines

i have a file in the gz format , the content of the file is as follow. gzcat f1.gz # 1.name # 2.location # 3.age # 4.dob . . . . . . . . . # 43.hobbies < Aravind,33,chennai,09091980, , , , , , , surfing> (5 Replies)
Discussion started by: aravindj80
5 Replies

8. UNIX for Beginners Questions & Answers

awk script to extract a column, replace one of the header and replace year(from ddmmyy to yyyy)

I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies

9. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies

10. Shell Programming and Scripting

Bash script - How to update header of scripts in one pass - multiline search/replace

Hello. A find command return a list of file. For each fileReplace the content starting with the first "§" (of two) ending with last "ɸ" (of two), regardless of the content ( five lines ) by the following content (exactly) : §2019_08_23§ # # ... (8 Replies)
Discussion started by: jcdole
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 01:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy