12-08-2008
In other words, you are using syntax for GNU ps, not HP UX ps.
10 More Discussions You Might Find Interesting
1. Solaris
I have a Solaris 8 Ultra 1 on my network that we use as a utility server.
The last command, which looks in the /var/adm/wtmpx file, is not working.
When I do a last, the latest entry is dated June 3, but the /var/adm/wtmpx file is dated whenever a login is successful (verified by typing a... (3 Replies)
Discussion started by: antalexi
3 Replies
2. Solaris
Hi,
I have installed opensolaris 10 in VMware. Everything is fine except ls command is not working. It is not displaying any files and directories. Sorry if the question is soo trivial. (8 Replies)
Discussion started by: mayahari
8 Replies
3. Shell Programming and Scripting
Hi Guys,
I have about 12000 files in a folder and I want to copy these to another folder. I am using the cp command to do this but it errors out saying cp -- argument list too long.
Is there any way to get around this?
I don't want to do a mv but use only cp.
Thanks (9 Replies)
Discussion started by: npatwardhan
9 Replies
4. UNIX for Advanced & Expert Users
I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies
5. Shell Programming and Scripting
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies
6. Shell Programming and Scripting
Hello.
I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct.
We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies
7. Shell Programming and Scripting
What does the command do lpr -Pqpr *.jpg do ? (1 Reply)
Discussion started by: Nabeel Nazir
1 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to select 30 days older files under current directory ,but not from subdirectory using below command.
find <Dir> -type f -mtime + 30
This command selecting all the files from current directory and also from sub directory .
I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies
9. UNIX for Dummies Questions & Answers
Hi everyone
I have a problem with my script
If I try directly this command
/usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
It works
But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
10. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
LEARN ABOUT DEBIAN
app::cmd::command
App::Cmd::Command(3pm) User Contributed Perl Documentation App::Cmd::Command(3pm)
NAME
App::Cmd::Command - a base class for App::Cmd commands
VERSION
version 0.318
METHODS
prepare
my ($cmd, $opt, $args) = $class->prepare($app, @args);
This method is the primary way in which App::Cmd::Command objects are built. Given the remaining command line arguments meant for the
command, it returns the Command object, parsed options (as a hashref), and remaining arguments (as an arrayref).
In the usage above, $app is the App::Cmd object that is invoking the command.
new
This returns a new instance of the command plugin. Probably only "prepare" should use this.
execute
$command_plugin->execute(\%opt, @args);
This method does whatever it is the command should do! It is passed a hash reference of the parsed command-line options and an array
reference of left over arguments.
If no "execute" method is defined, it will try to call "run" -- but it will warn about this behavior during testing, to remind you to fix
the method name!
app
This method returns the App::Cmd object into which this command is plugged.
usage
This method returns the usage object for this command. (See Getopt::Long::Descriptive).
command_names
This method returns a list of command names handled by this plugin. The first item returned is the 'canonical' name of the command.
If this method is not overridden by an App::Cmd::Command subclass, it will return the last part of the plugin's package name, converted to
lowercase. For example, YourApp::Cmd::Command::Init will, by default, handle the command "init".
Subclasses should generally get the superclass value of "command_names" and then append aliases.
usage_desc
This method should be overridden to provide a usage string. (This is the first argument passed to "describe_options" from
Getopt::Long::Descriptive.)
If not overridden, it returns "%c COMMAND %o"; COMMAND is the first item in the result of the "command_names" method.
opt_spec
This method should be overridden to provide option specifications. (This is list of arguments passed to "describe_options" from
Getopt::Long::Descriptive, after the first.)
If not overridden, it returns an empty list.
validate_args
$command_plugin->validate_args(\%opt, @args);
This method is passed a hashref of command line options (as processed by Getopt::Long::Descriptive) and an arrayref of leftover arguments.
It may throw an exception (preferably by calling "usage_error", below) if they are invalid, or it may do nothing to allow processing to
continue.
usage_error
$self->usage_error("This command must not be run by root!");
This method should be called to die with human-friendly usage output, during "validate_args".
abstract
This method returns a short description of the command's purpose. If this method is not overridden, it will return the abstract from the
module's Pod. If it can't find the abstract, it will look for a comment starting with "ABSTRACT:" like the ones used by
Pod::Weaver::Section::Name.
description
This method should be overridden to provide full option description. It is used by the built-in App::Cmd::Command::help command.
If not overridden, it returns an empty string.
AUTHOR
Ricardo Signes <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-05-05 App::Cmd::Command(3pm)