Sponsored Content
Full Discussion: how to check by line
Top Forums Shell Programming and Scripting how to check by line Post 302225990 by ooilinlove on Monday 18th of August 2008 02:03:44 AM
Old 08-18-2008
how to check error line by line

Hello, Member or professional

need help how to check by line
Example of the file is here

HTML Code:
cdr20080817164322811681txt = 26 char
cdr20080917164322811txt = 23 char
cdr20081017164322811683txt = 26 char
cdr20081117164322811txt = 23 char
I want it to be is this

HTML Code:
cdr20080917164322811txt  is error
cdr20081117164322811txt  is error
*word of line that be not 26 char is error

Is anyone can help me?

Thank.

Last edited by ooilinlove; 08-18-2008 at 03:44 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check last line with gawk?

I am writing a gawk script that checks some basic code conformance rules (java text files) using gawk. So far, so good. But I have a requirement to ensure that the last line in the java source files is "/* eof */". The below snippet works BUT is called more than once per file as / / matches a... (3 Replies)
Discussion started by: sjf
3 Replies

2. Shell Programming and Scripting

check line in a file

Hi all, How do we check in a file whether a line started with KEYWORD2 is right after the line started with KEYWORD1 for example, this file content: Abcdef gsh iasdi 94945 9085095 lksdjlkj KEYWORD1 skljfi slakjfoi ' opiport sdfl KEYWORD2 ksjflsk jfasope jkdfsk393 89374982 23 ... (3 Replies)
Discussion started by: fongthai
3 Replies

3. Shell Programming and Scripting

check line by line in a file

Hi there How can I check line by line in a file? I need to compare the first value with the second to know if they are equal. If those values are equal, I require to send "TRUE" to the output or "FALSE" otherwise until the complete file has been read. Thank you (6 Replies)
Discussion started by: loperam
6 Replies

4. Shell Programming and Scripting

how to check if a new line has been added to a file?

Have come up with the following but it doesn't seem to work.. Is there some other command i could use to get this to work? OUTPATH=/home/out PARMFILE=$OUTPATH/jobcount_test.txt LOG=$OUTPATH/job_count_monthlymail_log.txt HLOG=$OUTPATH/job_count_monthlymail_hlog.txt # echo " started at... (2 Replies)
Discussion started by: Jazmania
2 Replies

5. Shell Programming and Scripting

help on shell script to check line

Hi Scripting Gurus, Can someone help to transform the below logic into a shell script, might be easy for some of you. I have a file with below text, I need if the line has the ":" and the above to it is not a blank line should print " <text>: is incorrect format" Apple: ... (3 Replies)
Discussion started by: usyseng
3 Replies

6. Shell Programming and Scripting

Check if line has a space

Hi, I want to check if the given line from a text file has a spaces in between. if it does, then I want to add '"' double quotes at the beginning and end of the line. Otherwise leave the line as it is. For example, below is the sample content from my file. $cat file.txt test1 test2... (6 Replies)
Discussion started by: svajhala
6 Replies

7. Shell Programming and Scripting

How to check the number of columns in a line??

hi, i have a file with many records and each record may or may not have 6 columns. for example file1 : first second third fourth fifth sixth first second third fourth fifth first second third fourth fifth sixth first second third fourth fifth sixth seventh eigth if i cat the file and... (21 Replies)
Discussion started by: Little
21 Replies

8. Shell Programming and Scripting

How to check line existence in shell ?

Hi, We have some config file and there we are looking to append a line if it is not found. abc.conf authpriv.* /var/log/secure mail.* -/var/log/maillog *.debug @vxhgt-hskhng02 cron.* ... (12 Replies)
Discussion started by: Litu19
12 Replies

9. Shell Programming and Scripting

Sed/grep: check if line exists, if not add line?

Hello, I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files. is there a way to speed things up? Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Discussion started by: f77hack
4 Replies
ScXMLInvoke(3)							       Coin							    ScXMLInvoke(3)

NAME
ScXMLInvoke - Implementation of the <invoke> SCXML element. SYNOPSIS
#include <Inventor/scxml/ScXMLInvoke.h> Inherits ScXMLObject. Public Member Functions virtual SoType getTypeId (void) const =0 virtual void setTargetTypeAttribute (const char *id) const char * getTargetTypeAttribute (void) const virtual void setSrcAttribute (const char *id) const char * getSrcAttribute (void) const virtual void setSrcExprAttribute (const char *id) const char * getSrcExprAttribute (void) const virtual SbBool handleXMLAttributes (void) virtual void invoke (ScXMLStateMachine *statemachine)=0 Static Public Member Functions static SoType getClassTypeId (void) static void initClass (void) Protected Attributes char * targettype char * src char * srcexpr Additional Inherited Members Detailed Description Implementation of the <invoke> SCXML element. Since: Coin 3.0 Member Function Documentation SbBool ScXMLInvoke::handleXMLAttributes (void) [virtual] This method is called when the file reader has set all the XML attributes on the object, and wants the object to handle them and report if the values were ok or if a read error should be produced. Returns: TRUE if the attributes are ok, and FALSE on error. This base class implementation does nothing and just returns TRUE. Reimplemented from ScXMLObject. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 ScXMLInvoke(3)
All times are GMT -4. The time now is 09:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy