Splitting files using awk and reading filename value from input data

Login or Register to Reply

 
Thread Tools Search this Thread
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Help with reading two input files in awk
joseamck
Hello, I'm trying to write an awk program that reads two files inputs. example, file 1: 0.00017835 0.000176738 0.00018811 0.000189504 0.000188155 0.000180065 0.000178991 0.000178252 0.000182513 file 2: 1.7871769E-05 1.5139576E-16 1.5140196E-16 1.5139874E-16 1.7827407E-04 ...... Shell Programming and Scripting
5
Shell Programming and Scripting
Filename from splitting files to have the same filename of the original file with counter value
natalie23
Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ...... Shell Programming and Scripting
3
Shell Programming and Scripting
Reading specific contents from 1 input files and appending it to another input file
sksahu
Hi guys, I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help. I have 2 input files (example given below) Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it...... Shell Programming and Scripting
5
Shell Programming and Scripting
Splitting input files into multiple files through AWK command
arund_01
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...... Shell Programming and Scripting
3
Shell Programming and Scripting
awk reading 2 input files but not getting expected value
pdtak
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...... Shell Programming and Scripting
1
Shell Programming and Scripting
LOOKBIB(1)						      General Commands Manual							LOOKBIB(1)

NAME
lookbib - search bibliographic databases
SYNOPSIS
lookbib [ -v ] [ -istring ] [ -tn ] filename... It is possible to have whitespace between a command line option and its parameter.
DESCRIPTION
lookbib prints a prompt on the standard error (unless the standard input is not a terminal), reads from the standard input a line contain- ing a set of keywords, searches the bibliographic databases filename... for references containing those keywords, prints any references found on the standard output, and repeats this process until the end of input. For each database filename to be searched, if an index filename.i created by indxbib(1) exists, then it will be searched instead; each index can cover multiple databases.
OPTIONS
-v Print the version number. -istring When searching files for which no index exists, ignore the contents of fields whose names are in string. -tn Only require the first n characters of keys to be given. Initially n is 6.
FILES
filename.i Index files.
SEE ALSO
refer(1), lkbib(1), indxbib(1) Groff Version 1.18.1 27 June 2001 LOOKBIB(1)

Featured Tech Videos