Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
I have a file with contents similar to this.
abcd
1234
4567
7666
jdjdjd
89289
9382
92
jksdj
9823
298
I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
I have a set of log files that are in the following format
======= set_1 ========
counter : 315
counter2: 204597
counter3: 290582
======= set_2 ========
counter : 315
counter2: 204597
counter3: 290582
======= set_3 ========
counter : 315
counter2: 204597
counter3: 290582
Is... (6 Replies)
Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count
The input file:
21 2341 A
21 2341 A
21 2341 A
21 2341 C
21 2341 C
21 2341 C
21 2341 C
21 4567 A
21 4567 A
21 4567 C
... (6 Replies)
So I have a file in the form
>
akdfvcnciejcndmdjfk
>
kdjkkkifjeeeeelfjfuf
>
fjfhchdejhfhfhfhfhfhf
>
skdkdhfhvnvncnccm
and I would like it to come out in the form
>1
akdfvcnciejcndmdjfk
>2
kdjkkkifjeeeeelfjfuf
>3
fjfhchdejhfhfhfhfhfhf (3 Replies)
Hello,
I am newbie to bash scripting. Could someone help me with the following.
I have log file with output as shown below
**************************LOG*************************
11/20/2013 9:11:23.64 Pinging xx.xx.xx.xx with 32 bytes of data:
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx:... (4 Replies)
I am trying to use awk skip each line with a ## or # and check each line after for STB= and if that value in greater than or = to 0.8, then at the end of line the text "STRAND BIAS" is written in else "GOOD".
So in the file of 4 entries attached.
awk tried:
awk NR > "##"' "#" -F"STB="... (6 Replies)
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with:
wc -l *|sort
15263 Image.txt
16401 reference.txt
40459 richtexteditor.txt
How can I also print the number of unique lines in each file?
15263 1401 Image.txt
16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
LEARN ABOUT DEBIAN
perl-depends
PERL-DEPENDS(1) cvs status - formatter PERL-DEPENDS(1)NAME
perl-depends - Roughly find out module depends from Perl file(s)
SYNOPSIS
perl-depends [options] FILE [FILE ...]
DESCRIPTION
Find out roughly the modules the program uses. This is based on the idea, that Perl evaluates the "use" commands at compile time and stores
the loaded module information into the %INC variable. By examining the loaded modules and comparing them against the standard Perl modules,
the external module dependencies can be roughly estimated.
The depends information can be used to determine what external modules have to be installed before a program can be used.
The target FILE have to be instrumented with the dependency checking code. The resulting "binary" is then stored in a temporary file which
the user runs.
This program does not run the instrumented files because it cannot know what possible options need to be passed for the program to trigger
"no behavior". That is, something that doesn't actually involve executing the "binary" in real. Such options passed would include
--version, --dry-run, invalid options like --generate-syntax-error-now, or invalid files etc. to make program stop on error. The user can
know better the details of running the intrumented file.
An example of output: the external module depends here is 'Regexp::Common' and the rest of them can be ignored.
Regexp::Common Regexp/Common.pm
Regexp::Common::CC Regexp/Common/CC.pm
...
OPTIONS -e, --extension=EXT
Use extension EXT for instrumented files. The default is ".tmp".
-h, --help
Print text help
--help-html
Print help in HTML format.
--help-man
Print help in manual page man(1) format.
-v, --verbose LEVEL
Print informational messages. Increase numeric LEVEL for more verbosity.
-V, --version
Print contact and version information.
EXAMPLES
Instrument a file, run it to see results and delete instrumentation:
perl-depends file.pl
perl file.pl.tmp --version
rm *.tmp
TROUBLESHOOTING
None.
ENVIRONMENT
None.
FILES
None.
EXIT STATUS
This program's exit status is not defined.
The instrumented programs exit status is 1 in case external moduels are displayed and 0 if no external modules are found.
DEPENDENCIES
Uses standard Perl modules.
BUGS AND LIMITATIONS
None.
SEE ALSO cpan(1)AVAILABILITY
http://freshmeat.net/projects/perl-depends
AUTHOR
Jari Aalto <jari.aalto@cante.net>
LICENSE
Copyright (C) 2009-2011 Jari Aalto <jari.aalto@cante.net>
This program is free software; you can redistribute and/or modify program under the terms of GNU General Public license either version 2 of
the License, or (at your option) any later version.
perl v5.10.1 2011-03-24 PERL-DEPENDS(1)