12-13-2010
Right-Click scripts and programs in finder
How can I add a right-click option where I can add my own programs and script to finder?
8 More Discussions You Might Find Interesting
1. Answers to Frequently Asked Questions
Every now and then our users post complete programs to this site. It is especially important that these contributions don't get lost, so I will collect them here. Some of these programs are intended to demonstrate a programming technique and some are ready to run. As a guideline, the code... (0 Replies)
Discussion started by: Perderabo
0 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
when i ssh into my linux machine, i can do a double left click and then right click to paste it anywhere i need.
However, on the actual machine, in the terminal, i cannot do a double left click and right click to paste it. i need to right click and select Copy followed by click click... (1 Reply)
Discussion started by: new2ss
1 Replies
3. UNIX for Dummies Questions & Answers
Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies
4. Shell Programming and Scripting
hi
i have a file and its contents is as below:
8290804808
1338108313
1313141441
13131313133
1313131311
33424242242
23242424242
i want to print only those fields in bold. how to do it? (3 Replies)
Discussion started by: pravfraz
3 Replies
5. Shell Programming and Scripting
Hi all,
Before I start writing my own file maintenance script, maybe one such program/scripts already exist somewhere :-)
Am looking for a file maintenance script/application that is configurable that I can use to process files under certain criteria, for example, removing files that are... (4 Replies)
Discussion started by: newbie_01
4 Replies
6. UNIX for Advanced & Expert Users
What files or programs have the ability to change your default network scripts and config files? All 3 of these very important files got changed on their own.
/etc/sysconfig/network-scripts/ifcfg-wlan0
/etc/sysconfig/networking/devices/ifcfg-wlan0... (4 Replies)
Discussion started by: cokedude
4 Replies
7. Shell Programming and Scripting
I have some C++ code in the following directory structure
/home/chrisd/tatsh/trunk/hstmy/
├── baseLib
├── bin
│ ├── awk
│ ├── bash
│ ├── diag
│ ├── ksh
│ │ └── TAG201011
│ ├── old
│ ├── perl
│ ├── prog
│ ├── py
│ └── tcsh
├── docs
├── fortran
├── others... (0 Replies)
Discussion started by: kristinu
0 Replies
8. UNIX for Dummies Questions & Answers
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies
LEARN ABOUT MOJAVE
cpan::distroprefs
CPAN::Distroprefs(3pm) Perl Programmers Reference Guide CPAN::Distroprefs(3pm)
NAME
CPAN::Distroprefs -- read and match distroprefs
SYNOPSIS
use CPAN::Distroprefs;
my %info = (... distribution/environment info ...);
my $finder = CPAN::Distroprefs->find($prefs_dir, \%ext_map);
while (my $result = $finder->next) {
die $result->as_string if $result->is_fatal;
warn($result->as_string), next if $result->is_warning;
for my $pref (@{ $result->prefs }) {
if ($pref->matches(\%info)) {
return $pref;
}
}
}
DESCRIPTION
This module encapsulates reading Distroprefs and matching them against CPAN distributions.
INTERFACE
my $finder = CPAN::Distroprefs->find($dir, \%ext_map);
while (my $result = $finder->next) { ... }
Build an iterator which finds distroprefs files in the given directory.
%ext_map is a hashref whose keys are file extensions and whose values are modules used to load matching files:
{
'yml' => 'YAML::Syck',
'dd' => 'Data::Dumper',
...
}
Each time "$finder->next" is called, the iterator returns one of two possible values:
o a CPAN::Distroprefs::Result object
o "undef", indicating that no prefs files remain to be found
RESULTS
"find()" returns CPAN::Distroprefs::Result objects to indicate success or failure when reading a prefs file.
Common
All results share some common attributes:
type
"success", "warning", or "fatal"
file
the file from which these prefs were read, or to which this error refers (relative filename)
ext
the file's extension, which determines how to load it
dir
the directory the file was read from
abs
the absolute path to the file
Errors
Error results (warning and fatal) contain:
msg
the error message (usually either $! or a YAML error)
Successes
Success results contain:
prefs
an arrayref of CPAN::Distroprefs::Pref objects
PREFS
CPAN::Distroprefs::Pref objects represent individual distroprefs documents. They are constructed automatically as part of "success"
results from "find()".
data
the pref information as a hashref, suitable for e.g. passing to Kwalify
match_attributes
returns a list of the valid match attributes (see the Distroprefs section in CPAN)
currently: "env perl perlconfig distribution module"
has_any_match
true if this pref has a 'match' attribute at all
has_valid_subkeys
true if this pref has a 'match' attribute and at least one valid match attribute
matches
if ($pref->matches(\%arg)) { ... }
true if this pref matches the passed-in hashref, which must have a value for each of the "match_attributes" (above)
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2014-01-06 CPAN::Distroprefs(3pm)