06-23-2010
Hi busyboy,Thanks for your advice.
Let me try to give you simple sample for what we'd like to do.
In case we have 4 columns from A to D, the delimitar should be 3.
But if B columns contains comma like 3rd row, this comma should be judged as delimitar, not usual character in csv format. We'd like to detect the invalid row with extra delimitar compaired to the other rows.
FieldA | FieldB|FieldC|FieldD
---------------------------
AAA,BBB,CCC,DDD
AA,BB,CC,DDD
AAA,BB,B,CCCC,DDDD -- NG ROW
We'd like to detect third row as invalid row with extra delimitar.
I'm wondering if we can use awk command to detect extra delimitar but so far I'm out of resources.
I'd be grateful if you could give me any little advice.
Thank you.
10 More Discussions You Might Find Interesting
1. Solaris
I am getting this error when trying to unzip a file.gz . Anyone know how to resolve this ? (3 Replies)
Discussion started by: jxh461
3 Replies
2. Shell Programming and Scripting
Hey Guys.
I need to code a series of menus that have four options, selectable either by the number in the menu or the name, in succession. This part I have achieved however I am struggling to find a way that should the user try to enter an invalid selection, such as the number 5 or an incorrect... (5 Replies)
Discussion started by: Mudja
5 Replies
3. Shell Programming and Scripting
Hi, I am getting the error
01.30 Invalid shell error
I am running the bash shell script in the korn login shell.
I have mentioned the #!/bin/bash statement in the my script but not sure why it is giving this error to me.. (4 Replies)
Discussion started by: mr_harish80
4 Replies
4. UNIX for Advanced & Expert Users
Hi.
I'm not UNIX expert, I need to do a shell to read a sequential file and show in the console the record numbers read, until the end of file.
The reason of this shell is to be sure if the file is not corrupt.
Thanks (1 Reply)
Discussion started by: hornam
1 Replies
5. Shell Programming and Scripting
Here is the question...
Create a new script, sub2, taking three parameters...
1.) the string to be replaced
2.) the string with which to replace it
3.) the name of the file in which to make the substitution
...that treats the string to be replaced as plain text instead of as a regular... (1 Reply)
Discussion started by: johnhisenburg
1 Replies
6. Shell Programming and Scripting
I want to detect key pressed in my .cgi web page, but it does not work even I found the code in other web site.
My code is :
#!/bin/sh
#=================================================
# PATH defination
# ================================================... (2 Replies)
Discussion started by: Shuinvy
2 Replies
7. Shell Programming and Scripting
I have to check daily 20 processes each day. The names are like Network1 Network2 Network3 ....... Network20.
There is built in utility for doing this. Following is the command to check a single network process.
check_process_status 1
If we want to check the status of Network2 then the... (6 Replies)
Discussion started by: Nakul_sh
6 Replies
8. AIX
/tmp/man18809436: Invalid file system control data detected
Help me
what do I do?
Если знаете русскии, пишите на нем. (2 Replies)
Discussion started by: islily
2 Replies
9. Shell Programming and Scripting
I wish to print my current shell which happens to be bash in my script check.sh
more check.sh
echo $0
echo `ps -p $$`
But instead of printing it prints check.sh i.e the name of the script for both the commands.
Can you please suggest how to print the current shell i m on inside the... (2 Replies)
Discussion started by: mohtashims
2 Replies
10. Shell Programming and Scripting
Team,
I am able to get ERROR message from my shell script, but sometime few severe error happen that tomcat server not started or not responding. How do we can detect it via shell script ?
here is my snippet I used for my case
tail -n0 -F $catalinaPath | while read line;
do
if echo... (0 Replies)
Discussion started by: Ghanshyam Ratho
0 Replies
Data(4) Kernel Interfaces Manual Data(4)
NAME
Data - Contains data to be sent to remote systems
SYNOPSIS
/usr/spool/uucp/LocalSystemName/D.SystemNamexxxx###
DESCRIPTION
Data (D.*) files contain the data to be sent to remote systems by the uucp uucico daemon. The full pathname of a data file is a form of
the following: /usr/spool/uucp/SystemName/D.SystemNamexxxx###
where the SystemName directory and the SystemName portion of the file name indicate the name of the remote system. The xxxx### notation is
the hexadecimal sequence number of the Command (C.*) file associated with that data file; for example, D.venus471afd8.
After a set period of time (specified by the uusched daemon), the uucico daemon transfers the data file to the designated system. It
places the original data file in a subdirectory of the uucp spooling directory named /usr/spool/uucp/SystemName, where the SystemName
directory is named for the computer that is transmitting the file, and creates a Temporary (TM.*) file to hold the original data file.
After receiving the entire file, the uucp program takes one of three actions: If the file was sent with the uucp command and there were no
transfer problems, the program immediately renames the TM.* file with the appropriate data filename, such as D.venus471afd8, and sends it
to the specified destination. If the file was sent with the uuto command, the uucp program also renames the temporary data file with the
appropriate D.* filename. It then places the data file in the public directory /usr/spool/uucppublic, where the user receives the data
file and handles it with one of the uupick command options. If there were transfer problems (such as a failed login or an unavailable
device), the temporary data file remains in the spooling subdirectory. The uudemon.cleanu command, a shell script, removes these files
automatically at specified intervals, or they can be removed manually.
FILES
Describes accessible remote systems Contains uucp command, data, and execute files Contain instructions for file transfers Store data files
temporarily after they have been transferred to a remote system Contain files that the uucp program has transferred
RELATED INFORMATION
Daemons: uucico(8), uusched(8), uuxqt
Commands: uucp(1), uupick(1), uuto(1), uux(1), uudemon(4) delim off
Data(4)