As a matter of shell coding style, the parentheses are completely unnecessary, and stuff in backticks works badly if there's a file name with spaces in it.
I don't see why you couldn't use that shell script to wrap the Perl code; there's nothing much there which Perl does better than the shell, other than not having to read the country file over and over again (but you could optimize that in the shell script, too). But anyway, here goes. I'm afraid this is completely untested.
Hello,
Im trying to extract a portion of a big file.
Using unique pattern /occurrence ,
(ex. loginname1,logoff and loginname2,logoff ),
I like to print the lines that contain the patterns and the lines between them.
Also, create a file for every login occurrence.
Thanks for everyone's... (1 Reply)
Hi all,
I'm new in the unix environment. I'm having a challenge in extracting data from a flat file and convert it to a CSV file format or I should be able to open it with MS Excel.
The input data in my flat file looks like this:
AV00001001155000063637143326711145412082EM SITHOLE... (3 Replies)
Hi All,
I have a requirement where I have to search the file with some text say "Exception". This exception word can be repeated for more then 10 times.
Suppose the "Exception" word is repeated at line numbers say x=10, 50, 60, 120. Now I want to extract all the lines starting from x-5 to... (3 Replies)
Hello everybody,
Here is my problem : I cannot find a way to extract data from a particular file and more precisely I cannot extract the result of my awk script to an external file because I am currently working on HP-UX.
I would like a simple script (without awk) which asks for a date like... (4 Replies)
Hi,
I have three files as below:
AA.DAT20110505063903.Z
AA.DAT20110405062903.Z
AA.DAT20110305061903.Z
All the above files are appended with Date and timestamp in compressed format.
I need to extract AA.DAT20110505063903.Z(which is the latest file) from one server and uncompress it... (2 Replies)
I need to extract some content of a file.
Example
file abc
vi abc
ooooooooo
bbbbbbbbb
vvv 1234 5
vvv 6789 3
xxxxxxxxxx
xxxxxxxxxx
i want to extract only the following content from file abc and store in another file say temp.
1234 5
6789 3
what should be my approach? (2 Replies)
Hi Freinds,
I have a file1.txt in the following format
File1.txt
I want to get 2 files from the above file filextra.txt should have the lines which are ending with "<" and remaining lines in the filecompare.txt file.
Please help. (3 Replies)
FILE_ID extraction from file name and save it in CSV file after looping through each folders
My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that?
I have folders in unix environment, directory structure is... (15 Replies)
Hi
I am writing a shell script to parse a CSV file , in which i am facing a problem to separate the columns . Could some one help me with it.
IN301330/00001 pvavan kumar limited xyz@ttccpp.com
IN302148/00002 PRECIOUS SECURITIES (P) LTD viash@yahoo.co.in
IN300239/00000 CENTRE india... (8 Replies)
Hi,
My target is to send a file created by Unix process to myself as an excel file. So I have used the below commands to achieve it.
tr -d '\t' < PROGRAM_CREATED_FILE | sed -e 's/\\//g' | awk 'BEGIN{FS=">"; OFS="\t"} '{$1=$1}1' > file.xls
gzip -9 file.xls
echo "test mail" | sendxchange -a... (3 Replies)
Discussion started by: PikK45
3 Replies
LEARN ABOUT X11R4
xkbnoteindicatorchanges
XkbNoteIndicatorChanges(3) XKB FUNCTIONS XkbNoteIndicatorChanges(3)NAME
XkbNoteIndicatorChanges - Notes the changes in a changes structure
SYNOPSIS
void XkbNoteIndicatorChanges ( old, new, wanted )
XkbIndicatorChangesPtr old;
XkbIndicatorNotifyEvent *new;
unsigned int wanted;
ARGUMENTS
- old XkbIndicatorChanges structure to be updated
- new event from which changes are to be copied
- wanted
which changes are to be noted
DESCRIPTION
Whenever an indicator changes state, the server sends XkbIndicatorStateNotify events to all interested clients. Similarly, whenever an
indicator's map changes, the server sends XkbIndicatorMapNotify events to all interested clients.
To receive XkbIndicatorStateNotify events, use XkbSelectEvents with both the bits_to_change and values_for_bits parameters containing
XkbIndicatorStateNotifyMask. To receive XkbIndicatorMapNotify events, use XkbSelectEvents with XkbIndicatorMapNotifyMask.
To receive events for only specific indicators, use XkbSelectEventDetails. Set the event_type parameter to XkbIndicatorStateNotify or
XkbIndicatorMapNotify, and set both the bits_to_change and values_for_bits detail parameters to a mask where each bit specifies one indica-
tor, turning on those bits that specify the indicators for which you want to receive events.
The changed parameter is a mask that is the bitwise inclusive OR of the indicators that have changed. If the event is of type XkbIndica-
torMapNotify, changed reports the maps that changed. If the event is of type XkbIndicatorStateNotify, changed reports the indicators that
have changed state. state is a mask that specifies the current state of all indicators, whether they have changed or not, for both
XkbIndicatorStateNotify and IndicatorMapNotify events.
When your client application receives either a XkbIndicatorStateNotify event or XkbIndicatorMapNotify event, you can note the changes in a
changes structure by calling XkbNoteIndicatorChanges.
The wanted parameter is the bitwise inclusive OR of XkbIndicatorMapMask and XkbIndicatorStateMask. XkbNoteIndicatorChanges copies any
changes reported in new and specified in wanted into the changes record specified by old.
STRUCTURES
Both types of indicator events use the same structure:
typedef struct _XkbIndicatorNotify {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* True => synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* specifies state or map notify */
int device; /* Xkb device ID, will not be XkbUseCoreKbd */
unsigned int changed; /* mask of indicators with new state or map */
unsigned int state; /* current state of all indicators */
} XkbIndicatorNotifyEvent;
xkb_type is either XkbIndicatorStateNotify or XkbIndicatorMapNotify, depending on whether the event is a kbIndicatorStateNotify event or
kbIndicatorMapNotify event.
SEE ALSO XkbIndicatorMapMask(3), XkbIndicatorStateMask(3), XkbSelectEventDetails(3), XkbSelectEvents(3)X Version 11 libX11 1.2.1 XkbNoteIndicatorChanges(3)