HI ,
I am new to shell scripting ,
I have a requirement that
I send a file for data quality ( original.csv) & i will be getting 4 files daily into a particular directory in return with cleansed data .
the files may be clean.csv,
unclean.csv ,
... (2 Replies)
Hi all this is a UNIX question.
I have a large flat file with millions of records.
col1|col2|col3
1|a|b
2|c|d
3|e|f
3|g|h
footer****
I am supposed to calculate the sum of col1 1+2+3+3=9, count of col1 1,2,3,3=4, and distinct count of col1 1,2,3=c3
I would like it if you avoid... (4 Replies)
hello everybody,
I have some files in directory.each file contain some data.
my requirement is add the count of each line of file in head of each file.
any advice !!!!!!!! (4 Replies)
Hi
I need to parse the file of same name which exist on different servers and calculate the count of string existed in both files.
Say a file abc.log exist on 2 servers.
I want to search for string "test" on both files and calculate the total count of search string's existence.
For... (6 Replies)
I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Hi All,
I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder )
E.x : Folder : /data/opt/backup
01/01/2012 a.txt
01/02/2012 b.txt
... (1 Reply)
hi,
i am having a file which contains the below content, i need to take the word count of if and print the file name also
inputfile.txt
file_name1.txt,type_name1.txt
file_name2.txt,type_name2.txt
i would need the word count of the files like this
if file_name*.txt
then
wc -l... (10 Replies)
Hi All,
I thinking on how to accelerate the speed on calculate the dat file against the number of records CTRL file.
There are about 300 to 400 folder directories that contains both DAT and CTL files.
DAT contain all the flat files records
CTL is the reference check file for the... (3 Replies)
Hi,
file1.txt
AAA
BBB
CCC
DDD
file2.txt
abc|AAA|AAAabcbcs|fnwufnq
bca|nwruqf|AAA|fwfwwefwef
fmimwe|BBB|fnqwufw|wufbqw
wcdbi|CCC|wefnwin|wfwwf
DDD|wabvfav|wqef|fwbwqfwfe
i need the count of rows of file1.txt present in the file2.txt
required output:
AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies
LEARN ABOUT REDHAT
head
HEAD(1) FSF HEAD(1)NAME
head - output the first part of files
SYNOPSIS
head [OPTION]... [FILE]...
DESCRIPTION
Print first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. With no
FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-c, --bytes=SIZE
print first SIZE bytes
-n, --lines=NUMBER
print first NUMBER lines instead of first 10
-q, --quiet, --silent
never print headers giving file names
-v, --verbose
always print headers giving file names
--help display this help and exit
--version
output version information and exit
SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for head is maintained as a Texinfo manual. If the info and head programs are properly installed at your site, the
command
info head
should give you access to the complete manual.
head (coreutils) 4.5.3 February 2003 HEAD(1)