Sponsored Content
Top Forums Shell Programming and Scripting Help with sort word followed by exponential number and numeric number at the same time Post 302786321 by cpp_beginner on Wednesday 27th of March 2013 08:34:52 AM
Old 03-27-2013
Hi anbu23,

I hope that second column is from smallest to largest while third column is largest to smallest.

Thanks ya Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to numeric sort on field time

i want to sort time field given by who command as a whole i have tried like this who|sort -n +4 -5 (1 Reply)
Discussion started by: rahulspatil_111
1 Replies

2. Shell Programming and Scripting

Conversion of Exponential to numeric in awk- not correct output

Hi All, I have 1 million records file. Using awk, I am counting the number of records. But as the number is huge, after crossing a number, awk is displaying it in exponential format. At the end, I need to verify this count given by awk with expected count. But as it is in exponential format,... (3 Replies)
Discussion started by: ssunda6
3 Replies

3. Linux

How to sort the number of occurrences

file:///C:/Users/TSHEPI%7E1.LEB/AppData/Local/Temp/moz-screenshot.pngATM@ubuntu:~$ cat numbers2 | sort -n | uniq -c 1 7 1 11 2 10 3 the 1st numbers are the counts from the command "uniq -c", which represent the number of occurrences of each in the file. The "sort -n"... (4 Replies)
Discussion started by: lebogot
4 Replies

4. UNIX for Advanced & Expert Users

query display number lines or records present in file only numeric value -without filename

Hi all Thanks in advance........... Please help me for this issue............ I have a file it has 11 records . I used the command like .... >$ wc -l file 11 file I'm getting output like 11 file (no.of records along with filename) here my requirement is, I want to display only... (3 Replies)
Discussion started by: ksrivani
3 Replies

5. Shell Programming and Scripting

How can I sort by n number is like words?

I want to sort a file with a list of words, in order of most occuring words to least occurring words as well as alphabetically. ex: file1: cat 3 cat 7 cat 1 dog 3 dog 5 dog 9 dog 1 ape 4 ape 2 I want the outcome to be: file1.sorted: dog 1 (12 Replies)
Discussion started by: castrojc
12 Replies

6. Shell Programming and Scripting

How to sort the files according to the number?

Hi Everyone, I have a question: I have a lot of file named like or10000.dat, or9100.dat, or100.dat, or3100.dat... I want to deal with these files according to the number in the name. So I want to deal with or100.dat first and then or3100.dat and so on. I used : for i in `ls or*.dat |... (11 Replies)
Discussion started by: wxuyec
11 Replies

7. Shell Programming and Scripting

Help with sort word and general numeric sort at the same time

Input file: 100%ABC2 3.44E-12 USA A2M%H02579 0E0 UK 100%ABC2 5.34E-8 UK 100%ABC2 3.25E-12 USA A2M%H02579 5E-45 UK Output file: 100%ABC2 3.44E-12 USA 100%ABC2 3.25E-12 USA 100%ABC2 5.34E-8 UK A2M%H02579 0E0 UK A2M%H02579 5E-45 UK Code try: sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Discussion started by: perl_beginner
2 Replies

8. Shell Programming and Scripting

Print only word not number

Hi, Need to extract only words not numbers #cat test.txt 123456 oracle web 56789 s21adm Required output #grep <options> test.txt oracle web s21adm Note, in between integer "s21adm" is required but not with full integer "123456" and "56789" (6 Replies)
Discussion started by: ksgnathan
6 Replies

9. UNIX for Dummies Questions & Answers

Sort by alpha then by number

I have a file like the following: /vol/release /vol/listing /vol/trees7 /vol/toperforce /vol/trees10 /vol/trees2 /vol/wtrain I have tried the following: cat file | sort -t/ -dfk3.1 -t/ -k3.6n That did not work. What I want to do is have the file sorted so that the first... (2 Replies)
Discussion started by: newbie2010
2 Replies

10. Shell Programming and Scripting

Find a word and increment the number in the word & save into new files

Hi All, I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl: run_build_model sparc_ifu_dec run_drc set_faults -model path_delay -atpg_effectiveness -fault_coverage add_delay_paths P1 set_atpg -abort_limit 1000 run_atpg -ndetects 1000 I would like... (6 Replies)
Discussion started by: jypark22
6 Replies
Module::Signature(3pm)					User Contributed Perl Documentation				    Module::Signature(3pm)

NAME
Module::Signature - Module signature file manipulation SYNOPSIS
As a shell command: % cpansign # verify an existing SIGNATURE, or # make a new one if none exists % cpansign sign # make signature; overwrites existing one % cpansign -s # same thing % cpansign verify # verify a signature % cpansign -v # same thing % cpansign -v --skip # ignore files in MANIFEST.SKIP % cpansign help # display this documentation % cpansign -h # same thing In programs: use Module::Signature qw(sign verify SIGNATURE_OK); sign(); sign(overwrite => 1); # overwrites without asking # see the CONSTANTS section below (verify() == SIGNATURE_OK) or die "failed!"; DESCRIPTION
Module::Signature adds cryptographic authentications to CPAN distributions, via the special SIGNATURE file. If you are a module user, all you have to do is to remember to run "cpansign -v" (or just "cpansign") before issuing "perl Makefile.PL" or "perl Build.PL"; that will ensure the distribution has not been tampered with. Module authors can easily add the SIGNATURE file to the distribution tarball; see "NOTES" below for how to do it as part of "make dist". If you really want to sign a distribution manually, simply add "SIGNATURE" to MANIFEST, then type "cpansign -s" immediately before "make dist". Be sure to delete the SIGNATURE file afterwards. Please also see "NOTES" about MANIFEST.SKIP issues, especially if you are using Module::Build or writing your own MANIFEST.SKIP. VARIABLES
No package variables are exported by default. $Verbose If true, Module::Signature will give information during processing including gpg output. If false, Module::Signature will be as quiet as possible as long as everything is working ok. Defaults to false. $SIGNATURE The filename for a distribution's signature file. Defaults to "SIGNATURE". $KeyServer The OpenPGP key server for fetching the author's public key (currently only implemented on "gpg", not "Crypt::OpenPGP"). May be set to a false value to prevent this module from fetching public keys. $KeyServerPort The OpenPGP key server port, defaults to 11371. $Timeout Maximum time to wait to try to establish a link to the key server. Defaults to 3. $AutoKeyRetrieve Whether to automatically fetch unknown keys from the key server. Defaults to 1. $Cipher The default cipher used by the "Digest" module to make signature files. Defaults to "SHA1", but may be changed to other ciphers via the "MODULE_SIGNATURE_CIPHER" environment variable if the SHA1 cipher is undesirable for the user. The cipher specified in the SIGNATURE file's first entry will be used to validate its integrity. For "SHA1", the user needs to have any one of these four modules installed: Digest::SHA, Digest::SHA1, Digest::SHA::PurePerl, or (currently nonexistent) Digest::SHA1::PurePerl. $Preamble The explanatory text written to newly generated SIGNATURE files before the actual entries. ENVIRONMENT
Module::Signature honors these environment variables: MODULE_SIGNATURE_CIPHER Works like $Cipher. MODULE_SIGNATURE_VERBOSE Works like $Verbose. MODULE_SIGNATURE_KEYSERVER Works like $KeyServer. MODULE_SIGNATURE_KEYSERVERPORT Works like $KeyServerPort. MODULE_SIGNATURE_TIMEOUT Works like $Timeout. CONSTANTS
These constants are not exported by default. CANNOT_VERIFY(0E0) Cannot verify the OpenPGP signature, maybe due to the lack of a network connection to the key server, or if neither gnupg nor Crypt::OpenPGP exists on the system. SIGNATURE_OK(0) Signature successfully verified. SIGNATURE_MISSING ("-1") The SIGNATURE file does not exist. SIGNATURE_MALFORMED ("-2") The signature file does not contains a valid OpenPGP message. SIGNATURE_BAD ("-3") Invalid signature detected -- it might have been tampered with. SIGNATURE_MISMATCH ("-4") The signature is valid, but files in the distribution have changed since its creation. MANIFEST_MISMATCH ("-5") There are extra files in the current directory not specified by the MANIFEST file. CIPHER_UNKNOWN ("-6") The cipher used by the signature file is not recognized by the "Digest" and "Digest::*" modules. NOTES
Signing your module as part of "make dist" The easiest way is to use Module::Install: sign; # put this before "WriteAll" WriteAll; For ExtUtils::MakeMaker (version 6.18 or above), you may do this: WriteMakefile( (MM->can('signature_target') ? (SIGN => 1) : ()), # ... original arguments ... ); Users of Module::Build may do this: Module::Build->new( (sign => 1), # ... original arguments ... )->create_build_script; MANIFEST.SKIP Considerations (The following section is lifted from Iain Truskett's Test::Signature module, under the Perl license. Thanks, Iain!) It is imperative that your MANIFEST and MANIFEST.SKIP files be accurate and complete. If you are using "ExtUtils::MakeMaker" and you do not have a MANIFEST.SKIP file, then don't worry about the rest of this. If you do have a MANIFEST.SKIP file, or you use "Module::Build", you must read this. Since the test is run at "make test" time, the distribution has been made. Thus your MANIFEST.SKIP file should have the entries listed below. If you're using "ExtUtils::MakeMaker", you should have, at least: #defaults ^Makefile$ ^blib/ ^pm_to_blib ^blibdirs These entries are part of the default set provided by "ExtUtils::Manifest", which is ignored if you provide your own MANIFEST.SKIP file. If you are using "Module::Build", you should have two extra entries: ^Build$ ^_build/ If you don't have the correct entries, "Module::Signature" will complain that you have: ==> MISMATCHED content between MANIFEST and distribution files! <== You should note this during normal development testing anyway. Testing signatures You may add this code as t/0-signature.t in your distribution tree: #!/usr/bin/perl use strict; print "1..1 "; if (!$ENV{TEST_SIGNATURE}) { print "ok 1 # skip Set the environment variable", " TEST_SIGNATURE to enable this test "; } elsif (!-s 'SIGNATURE') { print "ok 1 # skip No signature file found "; } elsif (!eval { require Module::Signature; 1 }) { print "ok 1 # skip ", "Next time around, consider install Module::Signature, ", "so you can verify the integrity of this distribution. "; } elsif (!eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') }) { print "ok 1 # skip ", "Cannot connect to the keyserver "; } else { (Module::Signature::verify() == Module::Signature::SIGNATURE_OK()) or print "not "; print "ok 1 # Valid signature "; } __END__ If you are already using Test::More for testing, a more straightforward version of t/0-signature.t can be found in the Module::Signature distribution. Also, if you prefer a more full-fledged testing package, and are willing to inflict the dependency of Module::Build on your users, Iain Truskett's Test::Signature might be a better choice. SEE ALSO
Digest, Digest::SHA, Digest::SHA1, Digest::SHA::PurePerl ExtUtils::Manifest, Crypt::OpenPGP, Test::Signature Module::Install, ExtUtils::MakeMaker, Module::Build AUTHORS
XX <cpan@audreyt.org> CC0 1.0 Universal To the extent possible under law, XX has waived all copyright and related or neighboring rights to Module-Signature. This work is published from Taiwan. <http://creativecommons.org/publicdomain/zero/1.0> perl v5.14.2 2013-06-19 Module::Signature(3pm)
All times are GMT -4. The time now is 10:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy