Sponsored Content
Top Forums Shell Programming and Scripting Bash Script giving "Command Not found" Post 302859521 by Corona688 on Thursday 3rd of October 2013 10:57:02 AM
Old 10-03-2013
Code:
"${a}a1"=...

Variables do not work this way.

Always avoid dynamic variable names if you can, they tend to be huge security holes and cause more headaches than they solve.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

In ksh shell command - Print "-ABC" is giving error

Hi Guys, while executing the following command : print "-ABC" is giving following error : ksh: print: bad option(s) I cannot use echo for some other reasons, so any other option ? (2 Replies)
Discussion started by: sagarjani
2 Replies

2. Shell Programming and Scripting

"-bash: sqlldr: command not found"

hi all, here i am trying to run one control file. but getting "-bash: sqlldr: command not found" error :confused: the code is given below. sqlldr $db_username/$db_password@$db_sid control=$loading_path/load_to_table.ctl log=loading.log can anybody help me in fixing the issue? ... (1 Reply)
Discussion started by: vinayakatj56
1 Replies

3. Shell Programming and Scripting

How to distinguish between "command not found" and "command with no result"

system() call imeplemented in solaris is such a way that: Command not found - return code 1 Command executed successfully without Output - return code 1 how to distinguish between these two based on return code in a c - file? Can you help on this ? (5 Replies)
Discussion started by: iitmadhu
5 Replies

4. Post Here to Contact Site Administrators and Moderators

What's happens with my thread about "-bash: ELF: command not found "?

Hi, Today, I've submitted a new tread in "Shell Programming and Scripting" forum, with title "-bash: ELF: command not found ". However, this thread has disappear. Can somebody give me an explanation? Regards. (3 Replies)
Discussion started by: Sonia_
3 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

"Command not found" doing a while loop in bash/shell

i=0 numberofproducts=${#urls} #gets number of entries in array called "urls" numberofproductsminusone=`expr $numberofproducts - 1` #-subtract by one while do wget ${urls} i=$(( $i + 1 )) sleep 10 done I'm getting an error ./scrape: line 22: [0: command not found that... (3 Replies)
Discussion started by: phpchick
3 Replies

7. Shell Programming and Scripting

Bash script fails with "function: not found" error

Hello everyone, I am having problems figuring this out. This script below is supposed to create a list of file names with their "md5sum", in a file "lib-list.txt" When I run it "sh component-list.sh " I get this:component-list.sh: 4: component-list.sh: function: not found component-list.sh:... (4 Replies)
Discussion started by: joemb
4 Replies

8. UNIX for Dummies Questions & Answers

"Help with bash script" - "License Server and Patch Updates"

Hi All, I'm completely new to bash scripting and still learning my way through albeit vey slowly. I need to know where to insert my server names', my ip address numbers through out the script alas to no avail. I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies

9. UNIX and Linux Applications

Problem on SQLplus command ""bash: sqlplus: command not found""

Hi all, i face an error related to my server ""it's running server"" when i use sqlplus command $ sqlplus bash: sqlplus: command not found the data base is up and running i just need to access the sqlplus to import the dump file as a daily backup. i already check the directory... (4 Replies)
Discussion started by: clerck
4 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
Perl::Critic::Policy::Variables::ProhibitReusedNames(3pmUser Contributed Perl DocumentatiPerl::Critic::Policy::Variables::ProhibitReusedNames(3pm)

NAME
Perl::Critic::Policy::Variables::ProhibitReusedNames - Do not reuse a variable name in a lexical scope AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
It's really hard on future maintenance programmers if you reuse a variable name in a lexical scope. The programmer is at risk of confusing which variable is which. And, worse, the programmer could accidentally remove the inner declaration, thus silently changing the meaning of the inner code to use the outer variable. my $x = 1; for my $i (0 .. 10) { my $x = $i+1; # not OK, "$x" reused } With "use warnings" in effect, Perl will warn you if you reuse a variable name at the same scope level but not within nested scopes. Like so: % perl -we 'my $x; my $x' "my" variable $x masks earlier declaration in same scope at -e line 1. This policy takes that warning to a stricter level. CAVEATS
Crossing subroutines This policy looks across subroutine boundaries. So, the following may be a false positive for you: sub make_accessor { my ($self, $fieldname) = @_; return sub { my ($self) = @_; # false positive, $self declared as reused return $self->{$fieldname}; } } This is intentional, though, because it catches bugs like this: my $debug_mode = 0; sub set_debug { my $debug_mode = 1; # accidental redeclaration } I've done this myself several times -- it's a strong habit to put that "my" in front of variables at the start of subroutines. Performance The current implementation walks the tree over and over. For a big file, this can be a huge time sink. I'm considering rewriting to search the document just once for variable declarations and cache the tree walking on that single analysis. CONFIGURATION
This policy has a single option, "allow", which is a list of names to never count as duplicates. It defaults to containing $self and $class. You add to this by adding something like this to your .perlcriticrc: [Variables::ProhibitReusedNames] allow = $self $class @blah AUTHOR
Chris Dolan <cdolan@cpan.org> This policy is inspired by <http://use.perl.org/~jdavidb/journal/37548>. Java does not allow you to reuse variable names declared in outer scopes, which I think is a nice feature. COPYRIGHT
Copyright (c) 2008-2011 Chris Dolan This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Policy::Variables::ProhibitReusedNames(3pm)
All times are GMT -4. The time now is 09:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy