i have a file named file_names.dat where there are several files along with their path.
exp:
/data1/dir1/CTA_ACD_20071208.dat
/data1/dir1/CTA_DFG_20071208.dat
i want to write a script which will create a csv file with the name of the file and record count of that file
the output file... (4 Replies)
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)
Hello Gurus,
We have a requirement to count the valid number of records in a comma delimited file with double quotes.
The catch here is..few records have a new line carriage within the double quotes,,say for ex:we have a file called accounts the record count is 4827..but the actual valid count... (5 Replies)
i use unix command to take the record count for a file1
awk 'END{print NR}' filename
i already have a file2 which conatin the count like
...
..
rec_cnt=100
..
..
I want to replace the record in the file2 using the record i take from file1.
suggest me some simple ways of doing it... (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)
Hi all
How to verify the number of records in case of delimited file, If the file has records. And then if it is not equal to mentioned no. of records, email is triggered and file is moved to bad directory path.
Example
-----
input file = a.txt
bad directory path : /usr/bin/bad (6 Replies)
HI,
I need to print the record count of a file using shell script.
If the record count of a file excluding header and trailer record if greater than zero then print 'Record count of a file is xxxx records'.
If the record count is zero print 'zero records'
Thanks
Mahendra (1 Reply)
Hi,
I have a .dat file with contents like the below:
Input file
============SEQ NO-1: COLUMN1==========
9835619
7152815
============SEQ NO-2: COLUMN2 ==========
7615348
7015548
9373086
============SEQ NO-3: COLUMN3===========
9373086
Expected Output: (I just... (1 Reply)
Hi All ,
We need one help on the below requirement.We have multiple pipe delimited .txt file(around 100 .txt files) present on one directory.We need the total record count of all the files present in that directory without header.File format as below :
... (8 Replies)
Discussion started by: STCET22
8 Replies
LEARN ABOUT HPUX
lifinit
lifinit(1) General Commands Manual lifinit(1)NAME
lifinit - write LIF volume header on file
SYNOPSIS
nnn] nnn] string] nnn] nnn] nnn] file
DESCRIPTION
writes a LIF volume header on a volume or file.
Options
recognizes the following options and command-line arguments which can appear in any order:
Sets volume size to
nnn bytes. If nnn is not a multiple of 256, it is rounded down to the next such multiple.
Sets directory size to
nnn file entries. If nnn is not an integer multiple of 8, it is rounded up to next such multiple.
Sets the volume name to be
string. If the option is not specified, the volume name is set to the last component of the path name specified by file.
A legal LIF volume name is 6 characters long and is limited to uppercase letters (A-Z), digits (0-9) and the underscore
character (_). The first character (if any) must be a letter. The utility automatically performs translation to create
legal LIF volume names. Therefore, all lowercase letters are converted to uppercase, and all other characters except
numeric and underscore are replaced with a capital letter If the volume name does not start with a letter, the volume
name is preceded by a capital letter The volume name is also right-padded with spaces or truncated as needed to be six
characters long. If is used with no string, the default volume name is set to 6 spaces.
set the initial system load (ISL) start address to
nnn in the volume label. This is useful when building boot media for Series 700/800 systems.
specifies the length in bytes of the ISL code in the LIF volume.
set the ISL entry point to
nnn bytes from the beginning of the ISL. For example, specifying means that the ISL entry point is 3272 (decimal) bytes
from the beginning of the ISL object module.
forces the directory start location to be the nearest multiple of
nnn x 1024 bytes from the beginning of the volume. This is necessary for booting Series 700/800 systems from LIF media.
If file does not exist, a regular HP-UX disk file is created and initialized.
The default values for volume size are 256 kilobytes for regular files, and the actual capacity of the device for device files.
The default directory size is a function of the volume size. A percentage of the volume size is allocated to the volume directory as fol-
lows:
|
Volume Size | Directory Size
------------+----------------
< 2MB | ~1.3%
> 2MB | ~0.5%
Each directory entry occupies 32 bytes of storage. The actual directory space is subject to the rounding rules stated above.
RETURN VALUE
returns exit code 0 if the volume is initialized successfully. Otherwise it prints a diagnostic message and returns nonzero.
EXAMPLES
Initialize file to be a LIF volume containing 500000 bytes with 10 directory file entries:
Initialize device as a LIF volume using default initialization conditions (device must not be a mounted file system device):
WARNINGS
To prevent media corruption, do not terminate lifinit once it has started executing.
AUTHOR
was developed by HP.
SEE ALSO lifcp(1), lifls(1), lifrename(1), lifrm(1), lif(4).
lifinit(1)