Sponsored Content
Full Discussion: Bash variables
Top Forums Shell Programming and Scripting Bash variables Post 302176979 by fpmurphy on Wednesday 19th of March 2008 07:37:01 PM
Old 03-19-2008
Yes, asterisks are permitted in filenames on most UNIX systems. However, using an asterisk in a filename is a really bad idea for lots of reasons and is generally avoided. Note that POSIX filenames cannot contain asterisks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

bash shell variables

Hi everyone, I have added this to my .bash_profile. Whenever I log in and when I type javac I get a error message (java: command not found). Does the order counts? PATH=$JAVA_HOME/bin:$PATH:$HOME/bin JAVA_HOME=$JAVA_HOME/usr/local/jdk1.3.1_02 export JAVA_HOME PATH Thanks ny (3 Replies)
Discussion started by: xNYx
3 Replies

2. Shell Programming and Scripting

how to use in bash variables and quotes

I have some troubles with variables and quotes... I want: if $URL is empty (no user input) go to http://www.localhost/index.php/ else add this string (search) "?s=+$URL" EXAMPLE: No user input string= http://www.localhost/index.php/ User input = "unix" string=... (3 Replies)
Discussion started by: aspire
3 Replies

3. Shell Programming and Scripting

while loops and variables under bash

Hi, This is probably going to be very simple but i came across something i can't quite explain. Here is the situation: i have a list of files, which i'd like to process one by one (get the size, make some tests, whatever) and generate some statistics using different variables. Something... (5 Replies)
Discussion started by: m69w
5 Replies

4. Shell Programming and Scripting

Creating variables in bash

I am writing some scripts using bash and am wondering if there is a better way to perform the following set of formatting variables. s1=" " s2=" " s3=" " s4=" " s5=" " s6=" " s7=" " s8=" " frmt_titl="${bYl}%s${nClor}\n" frmt1_titl="${s1}$frmt_titl"... (10 Replies)
Discussion started by: kristinu
10 Replies

5. Shell Programming and Scripting

Indirect variables in Bash

Hello, I've spent hours this morning reading various past forum posts and documentation pages but I can't find exactly what I need. I'm trying to call a variable with a variable in the name without having to make a third variable. For example: path=AB legAB=50 leg$path I want to... (8 Replies)
Discussion started by: DFr0st
8 Replies

6. Shell Programming and Scripting

Bash for loop with two variables

Hi, I have the following folder structure: TST500-1000 TST500-2000 TST500-3000 TST700-1000 TST700-2000 TST700-3000 TST900-1000 TST900-2000 TST900-3000 I would like to store the numbers in the first column (considering "-" as column separator) into a variable then the numbers in... (3 Replies)
Discussion started by: alex2005
3 Replies

7. Shell Programming and Scripting

BASH arrays and variables of variables in C++

Sometimes it is handy to protect long scripts in C++. The following syntax works fine for simple commands: #define SHELLSCRIPT1 "\ #/bin/bash \n\ echo \"hello\" \n\ " int main () { cout <<system(SHELLSCRIPT1); return 0; } Unfortunately for there are problems for: 1d arrays:... (10 Replies)
Discussion started by: frad
10 Replies

8. Shell Programming and Scripting

Expect - bash and variables

I was wondering if anyone could provide some assistance. I trying to run an expect script within bash and get the results of a variable called RESULT. I Have tried a few things but none of them have worked. I know that the child process (the expect script) in this instance cannot set a variable... (6 Replies)
Discussion started by: ylafont
6 Replies

9. Shell Programming and Scripting

Passing awk variables to bash variables

Trying to do so echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies

10. Debian

Using sed with bash variables

Hi Guys I have another problem I'm trying to solve and hope that some one can help me here. This is the scenario: I have a file and I want to add a line on the 3rd line of the file using a bash script. but instead its adding the the bash variable $WEBSITE. Below is the bash script I'm... (6 Replies)
Discussion started by: linuxjunkie
6 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 (see PATTERN 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. PATTERN FORMAT
Patterns consist of a sequence of words separated by either periods, ".", or asterisks "*". The overall pattern may also be optionally preceded by an asterisk. Each word in the pattern conventionally starts with either an upper-case letter (in which case it denotes the class of either a widget or an option) or any other character, when it denotes the name of a widget or option. The last word in the pattern always indicates the option; the preceding ones constrain which widgets that option will be looked for in. When two words are separated by a period, the latter widget must be a direct child of the former (or the option must apply to only the indicated widgets). When two words are separated by an asterisk, any depth of widgets may lie between the former and latter widgets (and the option applies to all widgets that are children of the former widget). If the overall pattern is preceded by an asterisk, then the overall pattern applies anywhere it can throughout the whole widget hierarchy. Otherwise the first word of the pattern is matched against the name and class of the "." toplevel, which are usually set by options to wish. EXAMPLES
Instruct every button in the application to have red text on it unless explicitly overridden (note that on some platforms the option is ignored): 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 SEE ALSO
options(n), wish(1) KEYWORDS
database, option, priority, retrieve Tk option(n)
All times are GMT -4. The time now is 10:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy