09-14-2009
It's not clear what you are trying to do.
Are Qspace ABC and Qspace XYZ the names of two files (with spaces in the names)? Or are they just two lines of data in one file?
Also, it's not clear how the text is being transformed. What happened to the word red in the input file? What rule are you using to add colons?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey everyone ...
I wanted to process the contents of a file, as in modify its contents. whats the best way to do it on perl? In more detail I hav to go through the contents of the file, match patterns n then modify the contents of the same file depending on the matching results. Any help is... (2 Replies)
Discussion started by: garric
2 Replies
2. Shell Programming and Scripting
Aim:
To scan a file and ignore all characters that has an ASCII value from 0 to 31 and 127 to 255 and accept only those characters having an ASCII between 32 and 126.
Script:
#!/usr/local/bin/perl
$filename = "$ARGV";
if (-e $filename)
{
open(OUT, "${filename}") || die "can't... (10 Replies)
Discussion started by: SEEHTAS
10 Replies
3. Shell Programming and Scripting
I need a script to process a huge single line text file:
The sample of the text is:
"forward_inline_item": "Inline", "options_region_Australia": "Australia", "server_event_err_msg": "There was an error attempting to save", "Token": "Yes", "family": "Family","pwd_login_tab": "Enter Your... (1 Reply)
Discussion started by: hmsadiq
1 Replies
4. Shell Programming and Scripting
I am new to perl, and need a script to pull a CSV file, strip out 2 leading columns, and 2 ending columns, and resave the file in a new location. The file is basic and has less than 10,000 records. Secondly, can I schedule perl scripts to run daily? Can someone provide the basic script to... (1 Reply)
Discussion started by: cobbjob
1 Replies
5. Shell Programming and Scripting
I have an input array like :
"SVR1" GRP="EVT_BOX06B" SRID=100 MIN=2
"SVR1" GRP="EVT_BOX06B" SRID=200 MIN=1
"SVR2" GRP="ADM_BOX06B" SRID=100 MIN=1
"SVR1" GRP="EVT_BOX88B" SRID=100 MIN=2
"SVR1" GRP="EVT_BOX88B" SRID=200 MIN=1... (4 Replies)
Discussion started by: deo_kaustubh
4 Replies
6. UNIX for Advanced & Expert Users
Hi Experts,
I have this requirement to process large files (200MB+).Format of files is like:
recordstart
val1 1
val2 2
val3 4
recordstart
val1 5
val2 6
val3 1
val4 1
recordstart
val1 ... (4 Replies)
Discussion started by: mtomar
4 Replies
7. Programming
Hi everyone,
I have Xml files in a folder, I need to extract some attribute values form xml files and store in a hash. My xml file look like this.
<?xml version="1.0" encoding="UTF-8"?>
<Servicelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"... (0 Replies)
Discussion started by: pavani reddy
0 Replies
8. Shell Programming and Scripting
Dear all,
I got a perl script to write some data into an excel file using Spreadsheet::ParseExcel::SaveParser. After that I find all formulas in the excel file are gone.
Does any body encounter this problem or have any work around? (2 Replies)
Discussion started by: eldonlck
2 Replies
9. Shell Programming and Scripting
HI All,
I have scenerio where I need to call sub modules through for loop
for (i=0; i<30 ;i++)
{
..
..
..
subroutine 1;
subroutine 2;
}
I want this to be run in parallel
process1
{
...
...
subroutine 1;
subroutine 2; (0 Replies)
Discussion started by: gvk25
0 Replies
10. Programming
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies
option(n) Tk Built-In Commands option(n)
__________________________________________________________________________________________________________________________________________________
NAME
option - Add/retrieve window options to/from the option database
SYNOPSIS
option add pattern value ?priority?
option clear
option get window name class
option readfile fileName ?priority?
_________________________________________________________________
DESCRIPTION
The option command allows you to add entries to the Tk option database or to retrieve options from the database. The add form of the com-
mand adds a new option to the database. Pattern contains the option being specified, and consists of names and/or classes separated by
asterisks or dots, in the usual X format. Value contains a text string to associate with pattern; this is the value that will be returned
in calls to Tk_GetOption or by invocations of the option get command. If priority is specified, it indicates the priority level for this
option (see below for legal values); it defaults to interactive. This command always returns an empty string.
The option clear command clears the option database. Default options (from the RESOURCE_MANAGER property or the .Xdefaults file) will be
reloaded automatically the next time an option is added to the database or removed from it. This command always returns an empty string.
The option get command returns the value of the option specified for window under name and class. If several entries in the option data-
base match window, name, and class, then the command returns whichever was created with highest priority level. If there are several
matching entries at the same priority level, then it returns whichever entry was most recently entered into the option database. If there
are no matching entries, then the empty string is returned.
The readfile form of the command reads fileName, which should have the standard format for an X resource database such as .Xdefaults, and
adds all the options specified in that file to the option database. If priority is specified, it indicates the priority level at which to
enter the options; priority defaults to interactive.
The priority arguments to the option command are normally specified symbolically using one of the following values:
widgetDefault
Level 20. Used for default values hard-coded into widgets.
startupFile
Level 40. Used for options specified in application-specific startup files.
userDefault
Level 60. Used for options specified in user-specific defaults files, such as .Xdefaults, resource databases loaded into the X
server, or user-specific startup files.
interactive
Level 80. Used for options specified interactively after the application starts running. If priority is not specified, it defaults
to this level.
Any of the above keywords may be abbreviated. In addition, priorities may be specified numerically using integers between 0 and 100,
inclusive. The numeric form is probably a bad idea except for new priority levels other than the ones given above.
EXAMPLES
Instruct every button in the application to have red text on it unless explicitly overridden:
option add *button.foreground red startupFile
Allow users to control what happens in an entry widget when the Return key is pressed by specifying a script in the option database and add
a default option for that which rings the bell:
entry .e
bind .e <Return> [option get .e returnCommand Command]
option add *.e.returnCommand bell widgetDefault
KEYWORDS
database, option, priority, retrieve
Tk option(n)