Sponsored Content
Top Forums Shell Programming and Scripting TCL - Question regarding Braces {} Post 302740811 by rdcwayx on Thursday 6th of December 2012 09:39:41 PM
Old 12-06-2012
if current_name string has space in it, you will see the difference.

Last edited by rdcwayx; 12-06-2012 at 11:06 PM..
This User Gave Thanks to rdcwayx For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

few TCL question

Hello I am a TCL beginer, so please answer accordingly here are my question: 1. variable scope I built a text widget and gave it a textvariable: cmd_entry, I I sent it to a procedure where I declare it as “global cmd_entry” and give it a value The problem is that in the main program... (0 Replies)
Discussion started by: orid
0 Replies

2. Shell Programming and Scripting

Use of curly braces with variables

Hi, I am new to shell scripting.I have worked somewhat with Perl though. I am not able to find what the second line does and how does it do. <code> FP_RUNNING=`service filepool status` FP_RUNNING=${FP_RUNNING%% *} <\code> After the first line,the variable FP_RUNNING stores '1 FilePool... (2 Replies)
Discussion started by: abhinavsinha
2 Replies

3. Programming

Tcl question

Hello guys, please help me I want to use TCl to move the lines with line number as odd number to a new file source_odd.txt, and move the lines with character 'a' to another file source_a.txt. I also want to create a tcl function to list all the file names in a appointed directory. (1 Reply)
Discussion started by: kunleoyafajo
1 Replies

4. Shell Programming and Scripting

Simple question: Tcl button color

Hey, Can anyone tell me what is the default tcl button color is? I've already tried gray60/70/80/85/90/95. None are the same. Thanks, Phil. -----Post Update----- You can disregard this question, found the color in #E0DFE3 (0 Replies)
Discussion started by: Phi01
0 Replies

5. Shell Programming and Scripting

Question on TCL regexp and match

Hello everyone, I'm new in tcl scripting. I'm currently studying a tcl script and came across this line: regexp {(\d+)(\S?)} $opts match opt swi According to my understanding, this line means to search in the opts variable for one or more digit, followed by a non-whitespace character... (2 Replies)
Discussion started by: mar85
2 Replies

6. Shell Programming and Scripting

Question on regexp in TCL

I need some help with regexp in tcl. The following code does work if the $urlvar ends in jpg,jpeg,png or gif. Eg, protocol(http/https)://testsite.com/images/image1.jpg if { ! } { //Do something } My problem is that if the URL does not end in these extensions this regexp is of no... (1 Reply)
Discussion started by: ampak
1 Replies

7. UNIX for Dummies Questions & Answers

How do I pull the value between curly braces?

Hi everyone, I've got a file that looks like this: uid{508}pid{22224}pname{/PPROGRAM/pprgramx -profile:LIVE -serv:as ... I want to pull the value of pid between the curly braces, or 22224 in this example. pid is always the second pair of curly braces, but the length of the number is... (7 Replies)
Discussion started by: Scottie1954
7 Replies

8. Shell Programming and Scripting

For getting value between the braces

Hi I have a file called tmp with the content as belowmore tmp NAMELIST(Hari) NAMELIST(Raju) I want to get the values between the brackets. When I executed the below command on zlinux I get the output which I wantedmore tmp |awk -F'' '{print $2}' But when I execute the same in... (3 Replies)
Discussion started by: harimhkr
3 Replies

9. Shell Programming and Scripting

Curly braces in sed

Hi, I have below command in one of the script. Can you please let me know what does the curly braces do over here \{1,\}. The remaining part of the code atleast I am able to understand. sed -n 's/.*\-\()\{1,\}\)\-.*/\1/p' (13 Replies)
Discussion started by: tostay2003
13 Replies

10. Shell Programming and Scripting

When curly braces needed?

Hello, i was trying to find get a command to list duplicated files so i tried ls dir1 dir2 | awk '{x++}' and it didnt work. After a bit of searching online i found that it works without the curly braces ls dir1 dir2 | awk 'x++' I thought the curly braces were needed in awk so... (6 Replies)
Discussion started by: andy391791
6 Replies
smmaillist(1M)						  System Administration Commands					    smmaillist(1M)

NAME
smmaillist - manage email alias entries SYNOPSIS
/usr/sadm/bin/smmaillist subcommand [ auth_args] -- [subcommand_args] DESCRIPTION
The smmaillist command manages one or more email alias entries for the appropriate files in the local /etc files name service or a NIS or NIS+ name service. subcommands smmaillist subcommands are: add Creates a new email alias definition and adds it to the appropriate files. To add an entry, the administrator must have the solaris.admin.usermgr.write authorization. delete Deletes an email alias entry. You can delete only one entry at a time. To delete an entry, the administrator must have the solaris.admin.usermgr.write authorization. Note: You cannot delete Postmaster or Mailer-Daemon aliases. list Lists one or more email alias entries. To list an entry, the administrator must have the solaris.admin.usermgr.read autho- rization. modify Modifies an email alias entry. To modify an entry, the administrator must have the solaris.admin.usermgr.write authoriza- tion. OPTIONS
The smmaillist authentication arguments, auth_args, are derived from the smc(1M) arg set and are the same regardless of which subcommand you use. The smmaillist command requires the Solaris Management Console to be initialized for the command to succeed (see smc(1M)). After rebooting the Solaris Management Console server, the first Solaris Management Console connection might time out, so you might need to retry the command. The subcommand-specific options, subcommand_args, must come after the auth_args and must be separated from them by the -- option. auth_args The valid auth_args are -D, -H, -l, -p, -r, and -u; they are all optional. If no auth_args are specified, certain defaults will be assumed and the user may be prompted for additional information, such as a password for authentication purposes. These letter options can also be specified by their equivalent option words preceded by a double dash. For example, you can use either -D or --domain with the domain argu- ment. -D | --domain domain Specifies the default domain that you want to manage. The syntax of domain is type:/host_name/domain_name, where type is nis, nisplus, dns, ldap, or file; host_name is the name of the machine that serves the domain; and domain_name is the name of the domain you want to manage. (Note: Do not use nis+ for nisplus.) If you do not specify this option, the Solaris Management Console assumes the file default domain on whatever server you choose to man- age, meaning that changes are local to the server. Toolboxes can change the domain on a tool-by-tool basis; this option specifies the domain for all other tools. -H | --hostname host_name:port Specifies the host_name and port to which you want to connect. If you do not specify a port, the system connects to the default port, 898. If you do not specify host_name:port, the Solaris Management Console connects to the local host on port 898. You may still have to choose a toolbox to load into the console. To override this behavior, use the smc(1M) -B option, or set your console preferences to load a "home toolbox" by default. -l | --rolepassword role_password Specifies the password for the role_name. If you specify a role_name but do not specify a role_password, the system prompts you to sup- ply a role_password. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure. -p | --password password Specifies the password for the user_name. If you do not specify a password, the system prompts you for one. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure. -r | --rolename role_name Specifies a role name for authentication. If you do not specify this option, no role is assumed. -u | --username user_name Specifies the user name for authentication. If you do not specify this option, the user identity running the console process is assumed. -- This option is required and must always follow the preceding options. If you do not enter the preceding options, you must still enter the -- option. subcommand_args Note: Descriptions and other arg options that contain white spaces must be enclosed in double quotes. o For subcommand add: -a address1 -a address2 . . . (Optional) Specifies the new email address. See sendmail(1M). -h (Optional) Displays the command's usage statement. -n alias_name Specifies the name of the alias you want to add. See sendmail(1M). o For subcommand delete: -h (Optional) Displays the command's usage statement. -n alias_name Specifies the alias you want to delete. o For subcommand list: -h (Optional) Displays the command's usage statement. -n alias_name (Optional) Specifies the name of the alias you want to display. If you do not specify an alias, all aliases are listed. o For subcommand modify: -a address1 -a address2 . . . (Optional) Specifies new email address(es) to replace the existing one(s). See sendmail(1M). -h (Optional) Displays the command's usage statement. -n alias_name (Optional) Specifies the name of the alias you want to modify. -N new_alias_name Specifies the new alias name. Use only when renaming an alias. See sendmail(1M). EXAMPLES
Example 1: Creating an alias The following creates the coworkers alias and adds the following member list: bill@machine1, sue@machine2, and me@machine3 to the alias. ./smmaillist add -H myhost -p mypasswd -u root -- -n coworkers -a bill@machine1 -a sue@machine2 -a me@machine3 Example 2: Deleting a mail alias The following deletes the my_alias alias: ./smmaillist delete -H myhost -p mypasswd -u root -- -n my_alias Example 3: Displaying members of a mail alias The following displays the list of members belonging to the my_alias alias: ./smmaillist list -H myhost -p mypasswd -u root -- -n my_alias Example 4: Displaying members of all mail aliases The following displays the list of members belonging to all mail aliases: ./smmaillist list -H myhost -p mypasswd -u root -- Example 5: Renaming a mail alias The following renames the current_name mail alias to new_name: ./smmaillist modify -H myhost -p mypasswd -u root -- -n current_name -N new_name Example 6: Redefining an address list The following changes the recipients of the alias my_alias to bill@machine1. Any previous recipients are deleted from the alias. ./smmaillist modify -H myhost -p mypasswd -u root -- -n my_alias -a bill@machine1 ENVIRONMENT VARIABLES
See environ(5) for a description of the JAVA_HOME environment variable, which affects the execution of the smmaillist command. If this environment variable is not specified, the /usr/java location is used. See smc(1M). EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Invalid command syntax. A usage message displays. 2 An error occurred while executing the command. An error message displays. FILES
The following files are used by the smmaillist command: /var/mail/aliases Aliases for sendmail(1M). See aliases(4). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmga | +-----------------------------+-----------------------------+ SEE ALSO
sendmail(1M), smc(1M), aliases(4), attributes(5), environ(5) SunOS 5.10 5 Jan 2001 smmaillist(1M)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy