Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To get the invalid characters from a file Post 302747337 by RudiC on Friday 21st of December 2012 05:45:27 AM
Old 12-21-2012
I'm pretty sure you won't get any other reply to this post. You don't specify the problem, you don't post input nor output files, the query you are referring to is missing - what kind of help do you expect?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Invalid Characters in the file.

I am working on AIX. We ftp files to a database. The flat files are having thousands of records and each record is having some 50 to 60 characters(there are fields having certain character length). In addition to some valid ascii characters some invalid characters like Å, å, Ä, ä or pipes creep in which... (5 Replies)
Discussion started by: kanu_pathak
5 Replies

2. UNIX for Dummies Questions & Answers

Invalid Characters in the file.

I am working on AIX. We ftp files to a database. The flat files are having thousands of records and each record is having some 50 to 60 characters(there are fields having certain character length). In addition to some valid ascii characters some invalid characters like Å, å, Ä, ä or pipes creep in which... (15 Replies)
Discussion started by: kanu_pathak
15 Replies

3. Programming

string with invalid characters

This is a pretty straight-forward question. Within a program of mine, I have a string that's going to be used as a filename, but it might have some invalid characters in it that wouldn't be valid in a filename. If there are any invalid characters, I want to get rid of them and essentially squeeze... (4 Replies)
Discussion started by: cleopard
4 Replies

4. Shell Programming and Scripting

writing shell script to find line of invalid characters

Hi, I have to write s script to check an input file for invalid characters. In this script I have to find the exact line of the invalid character. If the input file contain 2 invalid character sat line 10 and 17, the script will show the value 10 and 17. Any help is appreciated. (3 Replies)
Discussion started by: beginner82
3 Replies

5. UNIX for Dummies Questions & Answers

to delete an invalid file

there is a file is generated from my program due to undefined filename. -rw-r--r-- 1 angie angie 8644055 Jun 22 09:17 Ô$ÿÿÿÿÿÆ may i know how to delete this file..??? thanks in advance... :) (5 Replies)
Discussion started by: chxxangie
5 Replies

6. Shell Programming and Scripting

Capturing the invalid records to error file

HI, I have a source file which has the below data. Tableid,table.txt sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6 Tableid,table sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6 Tableid,table.txt sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6 Tableid,table sourceid,1,2,3,4,5,6 targetid,1,2,3,4,5,6... (6 Replies)
Discussion started by: shruthidwh
6 Replies

7. Shell Programming and Scripting

Remove invalid database characters on a file

Hi All - I'm building a script wherein it is design to remove characters that are not accepted on a non-unicode database. Examples are the following: ï,¿,½,Â,é, etc. I can easily sed those characters one-by-one but I there's a problem when other unicode characters are found. Is there any way to... (1 Reply)
Discussion started by: Jin_
1 Replies

8. Shell Programming and Scripting

Valid and invalid date in the file

Hi All, How to validate the 4th column,it is date column in the file, if it valid move to valid file else moved invalid file. 9f680174-cb87|20077337254|0|20120511|N 9f680174-cb88|20077337254|0|20120534|N i want two file valid.txt and invalid.txt Thanks, (7 Replies)
Discussion started by: bmk
7 Replies

9. Shell Programming and Scripting

How to get the Invalid records from a file using awk?

My Input file is fixed length record ends with . as end of the line and the character length is 4156 Example: 12234XYZ TY^4253$+00000-00000........... I need to check is there any control characters(like ^M,^Z) The line will be splitted awk '{id=substr($0,1,5) nm=substr($0,6,3)... (2 Replies)
Discussion started by: dineshaila
2 Replies

10. UNIX for Beginners Questions & Answers

Search for the invalid url in a file

Hello guys, Here i am writing a script to check for a valid url from a file,i am getting the valid url & i print it in a file and i want to print the invalid url also.how to do that? #here is my script if then URL=$(grep -E -o... (2 Replies)
Discussion started by: Meeran Rizvi
2 Replies
IKC(3pm)						User Contributed Perl Documentation						  IKC(3pm)

NAME
POE::Component::IKC -- POE Inter-Kernel Communication SYNOPSIS
IKC server use POE::Component::IKC::Server; # create all your sessions POE::Component::IKC::Server->spawn( port=>30, name=>'Server' ); # more options are available $poe_kernel->run(); IKC client use POE::Component::IKC::Client; POE::Component::IKC::Client->spawn( host=>name, port=>30, name=>'Client', on_connect=>&build); $poe_kernel->run(); sub build { # create sessions that depend on the foreign kernel. } Post a state on a foreign kernel $kernel->post('IKC', 'post', "poe://Server/session/state", $ONE_arg); The IKC is peer-to-peer. Server can post to client. $kernel->post('IKC', 'post', 'poe://Client/session/state', $ONE_arg); Call a state on a remote kernel Call semantics are impossible, because they would cause POE to block. IKC call is a bit different. It is a 'post', but with an extra RSVP parameter. $kernel->post('IKC', 'call', 'poe://Server/hello/world', $ONE_arg, 'poe:callback'); This will cause the returned value of the foreign state to be sent to state 'callback' in the current session. You may want the callback to be in another session, but I don't think this is a good idea. $kernel->post('IKC', 'call', 'poe://Server/hello/world', $ONE_arg, 'poe:/elsewhere/hi'); Note : if you use ->call('IKC'), it will return the number of foreign kernels the state was sent to. This is a handy way to find out if you are still connected to a foreign kernel. A little magic If a state is posted by a foreign kernel, $_[SENDER] is only valid during that state. However, you will be able to post back to it. $kernel->post($_[SENDER], 'something', 'the answer is foo'); The remote caller MUST have published states for them to be callable, eh? Publish / Subscribe You must publish a session's interface for it to be available to remote kernels. If you subscribe to a remote session, you may access it as if it was a local session. First, a session publishes its interfaces: $kernel->post('IKC', 'publish', 'session_alias', [qw(state1 state2 state3 state4)], ); Then a foreign kernel subscribes to it: # Look for a session on all known foreign kernels $kernel->post('IKC', 'subscribe', [qw(poe://*/session_alias/)]); # Look for a session on a specific foreign kernel $kernel->post('IKC', 'subscribe', [qw(poe://Pulse/timeserver)]); # Make sure the session has a given state $kernel->post('IKC', 'subscribe', [qw(poe://*/timeserver/connect)]); After subscription, a proxy session is created that can be accessed like any old session, though ->call() acts the same as ->post() for obvious reasons: $kernel->post('poe:/Pulse/timeserver', 'state', $arg1, $arg2...); Currently, the session alias used by post to the proxy session must be the same one as used when subscribing. Because kernels have multiple names, if you are using '*' as the kernel name when subscribing, the session alias might not be what you think it is. See "Monitor" for details. Of course, attempting to post to a proxy session before it is created will be problematic. To be alerted when the proxy session is created, a callback state may be specified, $kernel->post('IKC', 'subscribe', [qw(poe://*/timeserver)], 'timeserver_subscribed'); The callback will be called with a list of all the sessions that it managed to subscribe to. You should check this list before continuing. Better yet, you could use the IKC monitor (see below). One can also let POE::Component::IKC::Client->spawn deal with all the details. POE::Component::IKC::Client->spawn( port=>31337, name=>$name, subscribe=>[qw(poe://*/timeserver)], on_connect=>&create_me, ); 'on_connect' is only called when all the subscriptions have either been accepted. If a subscription was refused, create_ikc_client will give up. If multiple foreign kernels where quieried for a session (as is the case above), subscription is deemed to succeed if at least one foreign kernel accepts the subscription. To undo things : $kernel->post(IKC=>'retract', 'session_alias'=>[qw(states)]); $kernel->post(IKC=>'unsubscribe', [qw(poe://Pulse/timeserver)]); Monitor Say you wanted to monitor all remote kernels that connect to you: $kernel->post(IKC=>'monitor', '*'=>{register=>'some_event'}); sub some_event { my($name, $real)=@_[ARG1, ARG2]; print "- Remote kernel ", ($real ? '' : "alias "), "$name connected "; } Later, you want to know when a given remote session disconnects: $kernel->post(IKC=>'monitor', some_kernel=>{unregister=>'bye_bye'}); Or maybe you think a session should clean up and leave whenever IKC does. $kernel->post(IKC=>'monitor', '*'=>{shutdown=>'other_event'}); sub other_event { # kill wheels, alarms, selects and aliases here } See "monitor" in POE::Component::IKC::Responder for more details. Shutdown When you feel the time is right and you want to get rid of all IKC-related sessions, just do the following: $kernel->post(IKC=>'shutdown'); And they should all disapear. At worst, some will still have registered alises, but this won't prevent the kernel from exiting. The local kernel You can post to the local kernel as if it was remote: $kernel->post(IKC=>'post', "poe://$kernel->ID/session/state'=>$ONE_arg); However, you can't currently subscribe to local sessions. I don't know how I'm going to resolve this. DESCRIPTION
This is Inter-Kernel Communication for POE. It is used to get events from one POE kernel to another SEE ALSO
POE::Component::IKC::Responder -- Heart of the system POE::Component::IKC::Server -- Create a process that listens for other kernels. POE::Component::IKC::Client -- Create a process that connects to other kernels. POE::Component::IKC::ClientLite -- Light weight IKC implementation for places you can't use POE, such as mod_perl. POE::Component::IKC::Channel -- Handle communcation with other kernels. POE::Component::IKC::Proxy -- Proxy session that is created when you subscribe to a remote session. POE::Component::IKC::Freezer -- Pure-Perl serialization method. POE::Component::IKC::Specifier -- Helper routines for parsing IKC specifiers. AUTHOR
Philip Gwyn <perl-ikc at pied.nu> COPYRIGHT AND LICENSE
Copyright 1999-2011 by Philip Gwyn. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/language/misc/Artistic.html> perl v5.12.4 2011-08-27 IKC(3pm)
All times are GMT -4. The time now is 02:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy