allright. let's go other way:
if you want to run the command
you gotta be sure that shell will expand the wildcard and will find exact location to create the file.
To make sure just type:
What you got ?
I'm trying to delete lines from a large text file using VI.
Every line that I am wanting to delete start with 'S' - all others do not. (A list of users)
I've tried using * but doesn't seem to like it...any ideas...
Doesn't have to be VI - but I'm better with VI than sed/awk. (8 Replies)
when writing a shell script (bourne) and using a unix command like 'ls' is there anything special you need to do to use a wildcard (like *)? (3 Replies)
ok, I'm trying to write a script file that lists files with specific elements in the name into a txt file, it looks like this
ls s*.dat > file_names.txt
can't figure out whats wrong with that line, any ideas?
thanks in advance (10 Replies)
Hi All
Please excuse another straightforward question. When creating a tar archive from a directory I am attempting to use wildcards to eliminate certain filetypes (otherwise the archive gets too large). So I am looking for something along these lines.
tar -cf archive.tar * <minus all *.rst... (5 Replies)
Hi:
I have a requirement as below:
I have some standard Unix commands modified and kept them in a directory say /usr/clsh/bin. For example I have a script named "ls" kept here which is modified version of "ls" (say it always gives long listing i.e. ls -l).
When any user logs on and types... (2 Replies)
These 2 websites do a GREAT job of explaining different types of wildcards. I learned about the categories of characters which I never knew about at all.
GNU/Linux Command-Line Tools Guide - Wildcards
GREP (1 Reply)
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Hi experts,
I have multiple file names ending with .jsp located in $SOME_DIR, $SOME_DIR/f1/,$SOME_DIR/f2/test,$SOME_DIR/f3/fa
and there are equivalent class files in $SOME_DIR/WEB-INF/classes/_pages,$SOME_DIR/WEB-INF/classes/_pages/_f1,... (0 Replies)
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
LEARN ABOUT DEBIAN
rest::application::routes
REST::Application::Routes(3pm) User Contributed Perl Documentation REST::Application::Routes(3pm)NAME
REST::Application::Routes - An implementation of Ruby on Rails type routes.
SYNOPSIS
package MyApp;
use base 'REST::Application::Routes';
my $obj = REST::Application::Routes->new();
$obj->loadResource(
'/data/workspaces/:ws/pages/:page', => &do_thing,
# ... other routes here ...
);
sub do_thing {
my %vars = @_;
print $vars{ws} . " " . $vars{page} . "
";
}
# Now, in some other place. Maybe a CGI file or an Apache handler, do:
use MyApp;
MyApp->new->run("/data/workspaces/cows/pages/good"); # prints "cows good"
DESCRIPTION
Ruby on Rails has this concept of routes. Routes are URI path info templates which are tied to specific code (i.e. Controllers and Actions
in Rails). That is routes consist of key value pairs, called the route map, where the key is the path info template and the value is a
code reference.
A template is of the form: "/foo/:variable/bar" where variables are always prefaced with a colon. When a given path is passed to "run()"
the code reference which the template maps to will be passed a hash where the keys are the variable names (sans colon) and the values are
what was specified in place of the variables.
The route map is ordered, so the most specific matching template is used and so you should order your templates from least generic to most
generic.
See REST::Application for details. The only difference between this module and that one is that this one uses URI templates as keys in the
"resourceHooks" rather than regexes.
METHODS
These are methods which REST::Application::Routes has but its superclass does not.
getTemplateVars()
Returns a hash whose keys are the ":symbols" from the URI template and whose values are what where matched to be there. It is assumed that
this method is called either from within or after "loadResource()" is called. Otherwise you're likely to get an empty hash back.
getLastMatchTemplate()
This is an alias for "getLastMatchPattern()", since this class is about templates rather than regexes.
AUTHORS
Matthew O'Connor <matthew@canonical.org>
LICENSE
This program is free software. It is subject to the same license as Perl itself.
SEE ALSO
REST::Application, <http://manuals.rubyonrails.com/read/chapter/65>
perl v5.10.0 2007-08-09 REST::Application::Routes(3pm)