Sponsored Content
Full Discussion: Perl syntax question
Top Forums Programming Perl syntax question Post 302681507 by duskos on Friday 3rd of August 2012 01:02:40 PM
Old 08-03-2012
Hej djzort and thanks for your post. I chose map only cause I didn't know how to refer to every line in the file I'm reading from and have it in the same print $qry-> table command (just switched from bash to perl). I've tried with for and foreach but with no success...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

AWK syntax question

Hi, Have to check file names in some given directory. SO, What is the right syntax here: *$3*=="'$object_list'" - just wanted to check if $3 is in the object_list. And also, Do I need so many quotes around? (5 Replies)
Discussion started by: Leo_NN
5 Replies

2. Shell Programming and Scripting

awk syntax question

Hi I use awk command to delete the first blanc line of a file: awk '/^$/ && !f{f=1;next}1' infile > outfile can somebody please explain me what the last "1'" in !f{f=1;next}1' stands for... Thansk a lot -A (3 Replies)
Discussion started by: aoussenko
3 Replies

3. Shell Programming and Scripting

perl syntax help

Im new at scripting and im trying to write a script using perl that will make sure there are 2 command line integer arguments and then check if the 2nd argument is greater than the first. i believe im close but still receive my error message even when i have 2 arguments and the second part gives me... (6 Replies)
Discussion started by: livewire06
6 Replies

4. Shell Programming and Scripting

tar -C syntax question

I am writing a perl script to tar multiple files (in unix) from a given directory to a given output directory. I do NOT want the file path included in the tar, so I've flagged the -C option. Example: tar -cvf tar/1.tar -C htmp/source/ 1-1-1.xml However, I need to do this for a number of target... (3 Replies)
Discussion started by: michanjohns
3 Replies

5. Shell Programming and Scripting

Question about syntax error

first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe s = `expr ls -s Documents | grep Music | awk '{ print $1 }' ` t = `expr $t + $s` it give syntax error s not found t not found lol... any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies

6. Shell Programming and Scripting

Perl syntax

I'm a newbie to perl scripting. Can someone please explain the syntax below. Specifically what does -> and => do? $tz->site( => $site); (10 Replies)
Discussion started by: scj2012
10 Replies

7. UNIX for Dummies Questions & Answers

Perl syntax

Query with perl syntax Aim: is to change a perl script to use a new file I was required to replace - entries \"$entries\" with -lib <full_path_to_filename> So in the code detector.pm sub rundetector { my $class = shift; mkdir($resultDirectory); my... (3 Replies)
Discussion started by: sa@@
3 Replies

8. Shell Programming and Scripting

A Perl Syntax Question.

Greetings! Here's what I believe is a "simple one" for the community tonight ;) What I'm trying to do is assign a "true/false" value to a variable depending upon whether a named process (some-process) exists; and then test for this value in the succeeding logic. I banged my head against the... (2 Replies)
Discussion started by: LinQ
2 Replies

9. Shell Programming and Scripting

Perl String Replacement Syntax Question . . .

Greetings! I've been tooling about with Perl to make a few string replacements in some files; and seem to have run into a bit of a squeeze :) Beginning with a simple text file, test.txt, we have the following content to be worked:Now, not wanting to have anyone feel left out, I decided that... (6 Replies)
Discussion started by: LinQ
6 Replies

10. Shell Programming and Scripting

Question regarding quotation syntax

Hey guys, my first post on UNIX Forums(much overdue IMO)! I've got this bit of code that doesn't seem to be working correctly for an Android app I'm working on: "screen -S gmod1 -p 0 -X stuff " & "" & command.text & "`echo -ne '\015'`""" Basically it types command.text(variable determined... (4 Replies)
Discussion started by: stingwraith
4 Replies
iwidgets::radiobox(1)						  [incr Widgets]					     iwidgets::radiobox(1)

__________________________________________________________________________________________________________________________________________________

NAME
iwidgets::radiobox - Create and manipulate a radiobox widget SYNOPSIS
iwidgets::radiobox pathName ?options? INHERITANCE
itk::Widget <- iwidgets::Labeledframe <- iwidgets::Radiobox STANDARD OPTIONS
background borderWidth cursor disabledForeground foreground relief selectColor See the "options" manual entry for details on the standard options. INHERITED OPTIONS
labelBitmap labelFont labelImage labelMargin labelPos labelText labelVariable See the "labeledframe" class manual entry for details on the inherited options. WIDGET-SPECIFIC OPTIONS Name: command Class: Command Command-Line Switch: -command Specifies a Tcl command procedure to be evaluated following a change in the current radio box selection. Name: orient Class: Orient Command-Line Switch: -orient Default Value: vertical Specifies the orientation of the radiobuttons within the radiobox. Valid values are either "horizontal" or "vertical". __________________________________________________________________________________________________________________________________________________ DESCRIPTION
The iwidgets::radiobox command creates a radio button box widget capable of adding, inserting, deleting, selecting, and configuring radiobuttons as well as obtaining the currently selected button. METHODS
The iwidgets::radiobox command creates a new Tcl command whose name is pathName. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the com- mand. Many of the widget commands for the radiobox take as one argument an indicator of which radiobutton of the radiobox to operate on. These indicators are called indexes and allow reference and manipulation of radiobuttons. Radiobox indexes may be specified in any of the fol- lowing forms: number Specifies the radiobutton numerically, where 0 corresponds to the top radiobutton of the radiobox. end Indicates the last radiobutton of the radiobox. pattern If the index doesn't satisfy one of the above forms then this form is used. Pattern is pattern-matched against the tag of each radiobutton in the radiobox, in order from top to bottom, until a matching entry is found. The rules of Tcl_StringMatch are used. WIDGET-SPECIFIC METHODS pathName add tag ?option value option value? Adds a new radiobutton to the radiobuttond window on the bottom. The command takes additional options which are passed on to the radiobutton as construction arguments. These include the standard Tk radiobutton options. The tag is returned. pathName buttonconfigure index ?options? This command is similar to the configure command, except that it applies to the options for an individual radiobutton, whereas con- figureapplies to the options for the radiobox as a whole. Options may have any of the values accepted by the add widget command. If options are specified, options are modified as indicated in the command and the command returns an empty string. If no options are specified, returns a list describing the current options for entry index (see Tk_ConfigureInfo for information on the format of this list). pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the iwid- gets::radiobox command. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iwidgets::radiobox command. pathName delete index Deletes a specified radiobutton given an index. pathName deselect index Deselects a specified radiobutton given an index. pathName flash index Flashes a specified radiobutton given an index. pathName get Returns the tag of the currently selected radiobutton. pathName index index Returns the numerical index corresponding to index. pathName insert index tag ?option value option value ...? Same as the add command except that it inserts the new radiobutton just before the one given by index, instead of appending to the end of the radiobox. The option, and value arguments have the same interpretation as for the add widget command. pathName select index Selects a specified radiobutton given an index. EXAMPLE
package require Iwidgets 4.0 iwidgets::radiobox .rb -labeltext Fonts .rb add times -text Times .rb add helvetica -text Helvetica .rb add courier -text Courier .rb add symbol -text Symbol .rb select courier pack .rb -padx 10 -pady 10 -fill both -expand yes AUTHOR
Michael J. McLennan Mark L. Ulferts KEYWORDS
radiobox, widget Tk iwidgets::radiobox(1)
All times are GMT -4. The time now is 08:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy