Hi All,
I am using sqlldr to load my csv files into the database. The code in the sh script is as follows.
sqlldr ${DBUSER}/${DBPASS}@${ORACLE_SID} \
data=myCSV.data \
bad=myCSV.bad \
control=myCSV.ctl \
... (0 Replies)
Hi.
I think some people have already asked this, but the answers/questions seem to be about validating the contents inside a CSV file.
I am simply after a simple variable solution (ie 0 = false, 1 = true) that I can use in my script to say that file so-and-so is actually a CSV file, or in some... (4 Replies)
I have a csv file which has no header. the file has 15 fields and needs to go out with a header of 8 fields.
The header content needs to have some variables and some fixed that i have set up:
variable header fields
OUTFILE_YEAR=`date '+%y'`
DATE=`date '+%d%m%y'`
TIME=`date '+%H:%M:%S'`... (6 Replies)
Hi All,
I was wondering if there is a utility/perl library/way of validating the contents of a CSV file using an XSD.
i.e. Customer csv (including Header & Trailer)
Cust_num, Cust_nme, Cust_typ, Cust_act_dte, Cust_loc,
101,Joe's Pizza,Retail,10121979,Detroit,
102,Sony... (6 Replies)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Hi,
I need a script that validates a file header/detail/trailer. File layout is:
Header - Rec_Type|File_name|File_Date
Detail - Rec_Type|field1|field2|field3...
Trailder - Rec_Type|File_name|File_Date|Record_count
Sample Data:
HDR|customer_data.dat|20120709... (7 Replies)
Hi All,
File contains header row.. we need to exclude the header row...no need to validate the first row in the file.
Data in the file should take valid data(two columns)..we need to exclude the more than two columns in the file except the first line.
email|firstname
a|123|100
b|345... (4 Replies)
Hi all i would appreciate your help...
I am looking for a set of unix commands which i can use to
1) ingest a csv file with a known format
2) validate the filename
3) validate the data/datatypes
4) Insert into an oracle db
Can you help get me started?
yogz888 (1 Reply)
Hi guys,
i want to validate the no.of colums in a csv file ,but if there is a comma(,) in any of the data values it should skip and count only valid (,) commas.
e.g
1.abc,pqrs,1234,567,hhh
result :4
2.abc,pqrs,1234,567,hhh,"in,valid",end12
result:6
here script should skip the comma inside... (10 Replies)
The below bash is a file validation check executed that will verify the correct header count of 10 and the correct data type in each field of the tab-delimited file. The key has the data type of each field in it. My real data has 58 headers in it but only the header and next row need to be... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT CENTOS
lslocks
LSLOCKS(8) System Administration LSLOCKS(8)NAME
lslocks - list local system locks
SYNOPSIS
lslocks [options]
DESCRIPTION
lslocks lists information about all the currently held file locks in a Linux system.
OPTIONS -h, --help
Print a help text and exit.
-n, --noheadings
Do not print a header line.
-o, --output list
Specify which output columns to print. Use --help to get a list of all supported columns.
The default list of columns may be extended if list is specified in the format +list (e.g. lslocks -o +BLOCKER).
-p, --pid pid
Display only the locks held by the process with this pid.
-r, --raw
Use the raw output format.
-u, --notruncate
Do not truncate text in columns.
OUTPUT
COMMAND
The command name of the process holding the lock.
PID The process ID of the process which holds the lock.
TYPE The type of lock; can be FLOCK (created with flock(2)) or POSIX (created with fcntl(2) and lockf(3)).
SIZE Size of the locked file.
MODE The lock's access permissions (read, write). If the process is blocked and waiting for the lock, then the mode is postfixed with an
'*' (asterisk).
M Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes. (See fcntl(2)).
START Relative byte offset of the lock.
END Ending offset of the lock.
PATH Full path of the lock. If none is found, or there are no permissions to read the path, it will fall back to the device's mount-
point. The path might be truncated; use --notruncate to get the full path.
BLOCKER
The PID of the process which blocks the lock.
NOTES
The lslocks command is meant to replace the lslk(8) command, originally written by
Victor A. Abell <abe@purdue.edu> and unmaintained since 2001.
AUTHORS
Davidlohr Bueso <dave@gnu.org>
SEE ALSO flock(1), fcntl(2), lockf(2)AVAILABILITY
The lslocks command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux February 2012 LSLOCKS(8)