08-09-2012
Quote:
Originally Posted by
raj_saini20
in x i am storing the name of file for particular row and y is nothing only used to make $1 value null.
Ok, but how is this awk command selecting which columns to include. From the script I cannot see how columns 4 and 5 are used to compare their values. I am sorry for all the questions, but trying to learn as much as possible. It might be that I want to include more columns later on and then it would be very useful that I can make small changes to the script. I am very happy with your time so far, so if you do not have time please feel free to let it slide
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
The below is the content of the file.
008.03.50.21|ID4|0015a3f01cf3
008.04.20.16|ID3|0015a3f02337
008.04.20.17|ID4_1xVoice|00131180d80e
008.04.20.03|ID3_1xVoice|0015a3694125
008.04.30.05|ID3_1xVoice|0015a3f038af
008.06.30.17|ID3_1xVoice|00159660d454... (2 Replies)
Discussion started by: ravi_rn
2 Replies
2. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
3. Shell Programming and Scripting
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Discussion started by: ckaramsetty
7 Replies
4. Shell Programming and Scripting
hI
I have file A
NSU30504 5 6 G 6
NSU3050B T 7 9 J
NSU30506 T I 8 9
NSU3050C H J K L Output:
NSU3050B T 7 9 J
NSU3050C H J K L
NSU30504 5 6 G 6
NSU30506 T I 8 9Video tutorial on how to use code tags in The UNIX and Linux Forums. (13 Replies)
Discussion started by: pareshkp
13 Replies
5. Shell Programming and Scripting
Hi Guys,
B07 U51C A1 44 B1 44 Yes
B07 L64U A2 44 B1 44 Yes
B07 L62U A2 44 B1 44 Yes
B07 L11C A4 32 B1 44 NO
B05 L12Z A1 12 B1 44 NO
B01 651Z A2 44 B1 44 NO
B04 A51Z A2 12 B1 44 NO
L07 B08D A4 12 B1 44 NO
B07 RU8D A4 44 B1 44 Yes
B07 L58D A4 15 B1 44 No
B07 LA8D A4 44 B1 44 Yes
B07... (6 Replies)
Discussion started by: asavaliya
6 Replies
6. Shell Programming and Scripting
I have a text file that has the following column data:
0.007
0.005
0.004
0.007
How do i output the total sum of the data above? (6 Replies)
Discussion started by: alegnagrp
6 Replies
7. Shell Programming and Scripting
Hi,
I have a data like
Input:
12||34|56|78
Output:
XYZ|12||34|56|78
I tried like this , but it puts it on another line
awk -F "|" ' BEGIN {"XYZ"} {print $0} 'file
Any quick suggessitons in sed/awk ? am using HP-UX (3 Replies)
Discussion started by: selvankj
3 Replies
8. Shell Programming and Scripting
Hi guys,
I need to append new data at the end of each line of the files. This new data is based on substring (3rd fields) of last column.
Input file xxx.csv:
U1234|1-5X|orange|1-5X|Act|1-5X|0.1 /sac/orange 12345 0
U5678|1-7X|grape|1-7X|Act|1-7X|0.1 /sac/grape 5678 0... (5 Replies)
Discussion started by: null7
5 Replies
9. Shell Programming and Scripting
Input File
Contig_1_294435nt 242231 242751
Contig_1_294435nt 242390 242782
Contig_1_294435nt 242390 242782
Contig_1_294435nt 291578 291668
Contig_2_242278nt 75910 76271
Contig_2_242278nt 76036 76316
Contig_2_242278nt 76036 76316... (2 Replies)
Discussion started by: perl_beginner
2 Replies
10. Shell Programming and Scripting
Hi guys,
I have problem to append new data at the end of each line of the files where it takes whole value of the nth column. My expected result i just want to take a specific value only. This new data is based on substring of 11th, 12th 13th column that has comma seperated value.
My code:
awk... (4 Replies)
Discussion started by: null7
4 Replies
LEARN ABOUT DEBIAN
hotswaprc
HOTSWAPRC(5) File Formats Manual HOTSWAPRC(5)
NAME
hotswaprc - configuration file for hotswap
DESCRIPTION
/etc/hotswaprc is the global configuration file for the hotswap utility.
It allows system administrators to specify arbitrary shell scripts to be run after a device is inserted, as well as before and after it is
removed. Scripts are selected according to the model name retrieved from the device. This is particularly helpful for automatic configura-
tion of CD-RW drives, which require SCSI emulation and bypass normal access via the IDE subsystem.
hotswaprc is implemented as an Extensible Mark-up Language (XML) application. XML documents are structured using elements of the form
<tag-name> content <tag-name>. A Document Type Definition (DTD) describes the possible content of each element.
Please refer to the XML specification for more information. The hotswap distribution also contains an example file, doc/hotswaprc.example,
which includes the DTD for the configuration file format.
ELEMENTS
<hotswap>
This is the root element of the document. Each valid hotswaprc must contain exactly one <hotswap> element. The <hotswap> element may
contain an arbitrary number of <device> elements.
<device>
The configuration file contains one <device> element for every device for which scripts are defined. The <device> element is com-
posed of the following elements in this order: <name>, <post-insert>, <pre-remove>, <post-remove>. All but <name> are optional.
<name> The content of this element is the model identification string of the IDE device the current <device> element refers to.
<post-insert>
Contains the shell script that is to be executed after the device has been inserted and registered with the kernel.
<pre-remove>
Contains the shell script that is to be run before hotswap attempts to unregister the device.
<post-remove>
Contains the shell script that is to be run after the device had been unregistered.
REPORT BUGS
Report bugs to t.stadelmann1@physics.ox.ac.uk.
AUTHOR
Written by Tim Stadelmann.
SEE ALSO
hotswap(1), xhotswap(1).
COPYRIGHT
Copyright (c) 2002-2003 Tim Stadelmann.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License (GPL), Version 2 or
any later version published by the Free Software Foundation.
26th November 2002 HOTSWAPRC(5)