Hi ,
i have two input files one is input.gz and another is ( input.txt) text file.in gz format input file each record contains 10 fields and corresponding header value is present in the text file as a single record i.e text file contains only 10 records which is header value,so output of the awk command should contain print field value from first field value from gz file and header value from text file,like that every field value should be associated with its field column name from the text file.
cat input.txt
I tried with the following command ,i am unable to achieve it.
Can someone guide me in getting the output.
Last edited by Franklin52; 05-04-2011 at 03:26 AM..
Reason: Please use code tags
Hi,
i have 2 files like f1 and f2
f1:
1
Note: some times it will be cahnged to 2 and 3.
f2:
1:20
2:30
4:50
6:70
8:90
3:20
1:30
1:40
output:
1:80
(sum of 1) (6 Replies)
I'm reading 2 input files but not getting expected value.
I should get an alpha value on file_1_data but not getting any.
Please help.
>cat test6.sh
awk '
FILENAME==ARGV { file_1_data=$0; print "----- 1 Line " NR " -----" $1; next }
FILENAME==ARGV { file_2_data=$0; print "----- 2... (1 Reply)
Hi,
I needs to split *.txt files from single directory depends on the some mutltiple input values. i have wrote the code like below
for file in *.txt
do
grep -i -h "value1|value2" $file > $file;
done.
My requirment is more input values needs to be given in grep; let us say 50... (3 Replies)
hi,
i'm a beginner in writing awk scripts and I have a problem with reading input files.
Requirement for my programm:
compare file1 to file2 and check if value in column1 is equal and value in column5 is different.
File 1:
180 P 01.01.2008 30.06.2008 2
180 P 01.07.2008 ... (10 Replies)
Hi Friends,
I have two files as input with data that looks like this:
file1.txt
1
2
3
4
file2.txt
a,aa
b,bb
c,cc
d,dd
e,ee
f,ff
instead of me doing 2 while loops to get the combinations
while read line_file1 (2 Replies)
Hi all ,
i want to pass multiple files as input to a for loop
for i in file1 file2 file3
do
some awk action < $i >> $i.out
done
but im getting error in that for loop is the way i use to pass files to awk using for correct and
2.we can directly pass multiple files to awk as... (7 Replies)
Requirement:
If $5(date field) in ipfile is less than $7(date field) in deact file & $1 of ipfile is present in deactfile then
$1 to be replaced by $2,$3,$4,$5,$6 of deact file
else if $5(date field) in ipfile is greater than $7(date field) in actfile & $1 of ipfile is present in actfile then... (5 Replies)
I have two files that I am going to use diff to find the differences but need to parse them before I do that. I have include the format of each file1 and file2 with the desired output of each (the first 5 fields in each file). The first file has a "chr" before the # that needs to be removed. I... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT CENTOS
xzless
XZLESS(1) XZ Utils XZLESS(1)NAME
xzless, lzless - view xz or lzma compressed (text) files
SYNOPSIS
xzless [file...]
lzless [file...]
DESCRIPTION
xzless is a filter that displays text from compressed files to a terminal. It works on files compressed with xz(1) or lzma(1). If no
files are given, xzless reads from standard input.
xzless uses less(1) to present its output. Unlike xzmore, its choice of pager cannot be altered by setting an environment variable. Com-
mands are based on both more(1) and vi(1) and allow back and forth movement and searching. See the less(1) manual for more information.
The command named lzless is provided for backward compatibility with LZMA Utils.
ENVIRONMENT
LESSMETACHARS
A list of characters special to the shell. Set by xzless unless it is already set in the environment.
LESSOPEN
Set to a command line to invoke the xz(1) decompressor for preprocessing the input files to less(1).
SEE ALSO less(1), xz(1), xzmore(1), zless(1)Tukaani 2010-09-27 XZLESS(1)