Sponsored Content
Top Forums Shell Programming and Scripting Merge Static and dynamic parts in variable declaration Post 302436570 by rob2468 on Monday 12th of July 2010 11:19:10 AM
Old 07-12-2010
i write the command in this way
awk '{subs[$1]+=1}END{print subs["dddd"]}'
input context is what you post
it gives 3

$1"_subs"?
i just saw this kind of variable in "MakeFile",maybe shell doesn't support
 

10 More Discussions You Might Find Interesting

1. Programming

Variable declaration

what does this mean when a variable is declared as register int i; Thanks. :confused: (2 Replies)
Discussion started by: laila63
2 Replies

2. Programming

differeEEK!nce between static and dynamic linking

hello, friends i would like to know what is the differnce between static library and dynamic library? How will u create them and what are there uses? (1 Reply)
Discussion started by: vijaya2006
1 Replies

3. Solaris

Static & Dynamic IP on the same machine

Hi, I have a SUN SPARC with 2 NICs running Solaris 9. I want to configure the first NIC using static IP and the second NIC using dynamic IP (DHCP client). Anyone help me! Thanks in advanced. Tinh (2 Replies)
Discussion started by: tinhlx
2 Replies

4. Shell Programming and Scripting

Help with variable declaration

I declared a variable x that gets the count(*) from a table. The table name is also defined as a variable. What's wrong with this statment : X=” select count(*) from ${table_name}“ then y = `${X}${table_name}' echo ${y} It throws an error saying count not found. Please... (1 Reply)
Discussion started by: dsravan
1 Replies

5. UNIX for Dummies Questions & Answers

Change static ip to dynamic ip

I had just install a solaris 10 server. I set the ip address to static during installation. I want to change it to dynamic but I don't know how. Expert here please help me! (5 Replies)
Discussion started by: jimmyysk
5 Replies

6. Shell Programming and Scripting

Unix script to segregate dynamic and static content of a web application

I need to deploy a JAVA application on two separate servers: 1. Web server (IBM HTTP Web Servers (IHS)) 2. Application Server (WebSphere Application Server WAS7.0) The static content will have to be deployed and handled on Web server. These would include GIFs, HTML, CSS, etc files.... (0 Replies)
Discussion started by: chani27
0 Replies

7. Emergency UNIX and Linux Support

Merge Static and dynamic parts in variable declaration

Dear Unix experts Moved from "Shell Programming and Scripting " I want to define a variable which contains dynmic and static part, daynamic part is the first field. Sample of data dddd aaaa sssss 12345 ssss 2323 234234 4242 dddd 3223 34234 54353 ssss 24234 3434 42342 dddd rwrw 423423... (2 Replies)
Discussion started by: yahyaaa
2 Replies

8. Shell Programming and Scripting

variable declaration

Hi Guys, What does this mean actually ? Can somebody give me any explanation ? x=${x:=1} Thanks (2 Replies)
Discussion started by: amit.behera
2 Replies

9. Programming

Shared, Static , Dynamic?

if I could compile the same source file as shared/static/dynamic what are the advantages/ disadv of each. PS:by dynamic i am asking about usage of "dlopen". How is it particularly diff from shared libs (2 Replies)
Discussion started by: dragonpoint
2 Replies

10. Shell Programming and Scripting

variable declaration

how to check 1. If variable is declared or not 2. If any value if assigned to variable or not. in UNIX shell script (6 Replies)
Discussion started by: ace_friends22
6 Replies
strict(3perl)						 Perl Programmers Reference Guide					     strict(3perl)

NAME
strict - Perl pragma to restrict unsafe constructs SYNOPSIS
use strict; use strict "vars"; use strict "refs"; use strict "subs"; use strict; no strict "vars"; DESCRIPTION
If no import list is supplied, all possible restrictions are assumed. (This is the safest mode to operate in, but is sometimes too strict for casual programming.) Currently, there are three possible things to be strict about: "subs", "vars", and "refs". "strict refs" This generates a runtime error if you use symbolic references (see perlref). use strict 'refs'; $ref = $foo; print $$ref; # ok $ref = "foo"; print $$ref; # runtime error; normally ok $file = "STDOUT"; print $file "Hi!"; # error; note: no comma after $file There is one exception to this rule: $bar = &{'foo'}; &$bar; is allowed so that "goto &$AUTOLOAD" would not break under stricture. "strict vars" This generates a compile-time error if you access a variable that wasn't declared via "our" or "use vars", localized via "my()", or wasn't fully qualified. Because this is to avoid variable suicide problems and subtle dynamic scoping issues, a merely local() variable isn't good enough. See "my" in perlfunc and "local" in perlfunc. use strict 'vars'; $X::foo = 1; # ok, fully qualified my $foo = 10; # ok, my() var local $foo = 9; # blows up package Cinna; our $bar; # Declares $bar in current package $bar = 'HgS'; # ok, global declared via pragma The local() generated a compile-time error because you just touched a global name without fully qualifying it. Because of their special use by sort(), the variables $a and $b are exempted from this check. "strict subs" This disables the poetry optimization, generating a compile-time error if you try to use a bareword identifier that's not a subroutine, unless it is a simple identifier (no colons) and that it appears in curly braces or on the left hand side of the "=>" symbol. use strict 'subs'; $SIG{PIPE} = Plumber; # blows up $SIG{PIPE} = "Plumber"; # just fine: quoted string is always ok $SIG{PIPE} = &Plumber; # preferred form See "Pragmatic Modules" in perlmodlib. HISTORY
"strict 'subs'", with Perl 5.6.1, erroneously permitted to use an unquoted compound identifier (e.g. "Foo::Bar") as a hash key (before "=>" or inside curlies), but without forcing it always to a literal string. Starting with Perl 5.8.1 strict is strict about its restrictions: if unknown restrictions are used, the strict pragma will abort with Unknown 'strict' tag(s) '...' As of version 1.04 (Perl 5.10), strict verifies that it is used as "strict" to avoid the dreaded Strict trap on case insensitive file systems. perl v5.14.2 2010-12-30 strict(3perl)
All times are GMT -4. The time now is 10:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy