In the shell command language, an entity that stores values. There are three types of parameters: variables (named parameters), positional parameters, and special parameters. Parameter expansion is accomplished by introducing a parameter with the '$' character.
--
"Parameter expansion" is the way to get the value that is stored in a parameter ( for example a variable )
So for example if you have a variable foo and you give it the value bar
, then the variable foo contains the value bar.
Then, to get the content of the variable foo, you prepend a $ sign:
Last edited by Scrutinizer; 11-02-2017 at 12:28 PM..
hey there
im a bit stuck on executing commands that include the special character '?'. can someone recommend a way on how i would be able to execute it?? i thought the glob function could be useful (still mite be) but upon entering the command
'ls pars?' it listed all the files in the... (1 Reply)
Hello,
I've had a daemon go a little bit mental and create directories using somments from a config file. The end result is I've ended up with directories with names such as #, 5625), (5725 etc etc etc...
However, when I try and delete them I get syntax errors, ( not expected,
rmdir #... (2 Replies)
Hi,
I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately.
a) What does this below character means?
b) How can i remove it,
I already have sed '/^$/d'
c) Will this effect the file by any means... (4 Replies)
Hi
I am comparing 2 files (using diff command) with numerical data in them. In the output file I want only the differences which are in file2 but not in file1. Although I am getting the diffences i am also getting special characters in the output file which i do not want. Can somebody help me
For... (3 Replies)
Hi,
In the shell script, i need to remove the special charater "\" with "\\". For example, i need to replace "D:\FXT\ABC.TXT" with "D:\\FXT\\ABC.TXT".
However, when trying to do something like , i get the below error :-
-->echo "D:\FXT\ABC.TXT" | sed -e 's#\#\\#g'
sed: 0602-404 Function... (7 Replies)
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids
The result should be :
20091020.Non-Agency CMO Daily Trade Recap  Hybrids
i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
When editing a file, vi displays a special character as ^L. Can you tell me the escaped character to be used in awk? And can that escaped character be used in a regexp in both sed and awk? (7 Replies)
a='CASH$$A'
/usr/xpg4/bin/grep -F "$a" *.txt
It is not able to grep CASH$$A string as it contains special character $$.
I also tried with
/usr/xpg4/bin/grep -F '$a' *.txt
but still not working.
I have to assign CASH$$A to a variable and serach that variable..i dont want to search the... (8 Replies)
Hi,
on ksh
What does the following do?
grep -v "toolbox" $home_oracle/.profile >$home_oracle/.profile.$$ Thanks.
Please use CODE tags as required by forum rules! (3 Replies)
Discussion started by: big123456
3 Replies
LEARN ABOUT DEBIAN
mojolicious::routes::match
Mojolicious::Routes::Match(3pm) User Contributed Perl Documentation Mojolicious::Routes::Match(3pm)NAME
Mojolicious::Routes::Match - Routes visitor
SYNOPSIS
use Mojolicious::Routes;
use Mojolicious::Routes::Match;
# Routes
my $r = Mojolicious::Routes->new;
$r->get('/foo')->to(action => 'foo');
$r->put('/bar')->to(action => 'bar');
# Match
my $m = Mojolicious::Routes::Match->new(PUT => '/bar');
$m->match($r);
say $m->captures->{action};
DESCRIPTION
Mojolicious::Routes::Match is a visitor for Mojolicious::Routes structures.
ATTRIBUTES
Mojolicious::Routes::Match implements the following attributes.
"captures"
my $captures = $m->captures;
$m = $m->captures({foo => 'bar'});
Captured parameters.
"endpoint"
my $endpoint = $m->endpoint;
$m = $m->endpoint(Mojolicious::Routes->new);
The routes endpoint that actually matched.
"root"
my $root = $m->root;
$m = $m->root($routes);
The root of the routes tree.
"stack"
my $stack = $m->stack;
$m = $m->stack([{foo => 'bar'}]);
Captured parameters with nesting history.
METHODS
Mojolicious::Routes::Match inherits all methods from Mojo::Base and implements the following ones.
"new"
my $m = Mojolicious::Routes::Match->new(GET => '/foo');
my $m = Mojolicious::Routes::Match->new(GET => '/foo', $ws);
Construct a new match object.
"match"
$m->match(Mojolicious::Routes->new, Mojolicious::Controller->new);
Match against a routes tree.
"path_for"
my $path = $m->path_for;
my $path = $m->path_for(foo => 'bar');
my $path = $m->path_for({foo => 'bar'});
my $path = $m->path_for('named');
my $path = $m->path_for('named', foo => 'bar');
my $path = $m->path_for('named', {foo => 'bar'});
my ($path, $ws) = $m->path_for;
my ($path, $ws) = $m->path_for(foo => 'bar');
my ($path, $ws) = $m->path_for({foo => 'bar'});
my ($path, $ws) = $m->path_for('named');
my ($path, $ws) = $m->path_for('named', foo => 'bar');
my ($path, $ws) = $m->path_for('named', {foo => 'bar'});
Render matching route with parameters into path.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojolicious::Routes::Match(3pm)