e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks,
Hello Tanu,
Welcome to forums, please use code tags for commands/cods/Inputs as per forum rules. Following may help you in same.
Thanks,
R. Singh
hi,,
i hav a file with many lines.i need to remove all lines before a line begginning with a specific pattern from the file because these lines are not required.
Can u help me out with either a perl script or shell script
example:-
if file initially contains lines:
a
b
c
d
.1.2
d
e
f... (2 Replies)
Hi Folks,
I got to know from this forums on how to grep from a particular line say line 6
awk 'NR==6 {print;exit}'
But how do i grep from line 6 till the end of the file or command output.
Thanks, (3 Replies)
Hi All,
I have a .txt file with some contents as below:
Hi How are you?
# Fine and you?
I want a script file which reads the .txt file and output the lines which does not start with #.
Hi How are you?
Help is highly appreciated.
Please use code tags when posting data and... (5 Replies)
Hello,
I have a command that show some application information. Now, I have to grep there informations, like:
# showlog | grep 1266
1266.1369866124 ::
1266.1304711286 ::
41031.1161812668 ::
41078.1301266480 ::
41641.712662564 ::
1266.333792515 ::
41462.1512661988 ::
1266.54932671... (5 Replies)
Here is the task that I was presented with:
I am dealing with about a 10,000 line input deck file for an analysis. About 10 separate blocks of around 25 lines of code each need to be updated in the input deck.
The input deck (deckToChange in the code below) comes with 2 separate files. File 1... (5 Replies)
Hi,
I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file.
for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'`
do
.
.
done
How... (4 Replies)
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
I have a file with a list of references towards the end and want to apply a grep for some string.
text ....
@unnumbered References
@sp 1
@paragraphindent 0
2017. @strong{Chalenski, D.A.}; Wang, K.; Tatanova, Maria; Lopez,
Jorge L.; Hatchell, P.; Dutta, P.; @strong{Small airgun... (1 Reply)
Shell : bash
OS : RHEL 6.8
I have a file like below.
$ cat pattern.txt
hello
txt1
txt2
txt3
some other text
txt4
I want to remove all lines in this file except the ones starting with txt . How can I do this ? (4 Replies)
Discussion started by: omega3
4 Replies
LEARN ABOUT DEBIAN
file::sharedir::par
File::ShareDir::PAR(3pm) User Contributed Perl Documentation File::ShareDir::PAR(3pm)NAME
File::ShareDir::PAR - File::ShareDir with PAR support
SYNOPSIS
use File::SharedDir::PAR ':ALL';
# exact same interface as the normal File::ShareDir:
# Where are distribution-level shared data files kept
$dir = dist_dir('File-ShareDir');
# Where are module-level shared data files kept
$dir = module_dir('File::ShareDir');
# Find a specific file in our dist/module shared dir
$file = dist_file( 'File-ShareDir', 'file/name.txt');
$file = module_file('File::ShareDir', 'file/name.txt');
# Like module_file, but search up the inheritance tree
$file = class_file( 'Foo::Bar', 'file/name.txt' );
You may choose to install the "File::ShareDir::PAR" functions into "File::ShareDir" so that they become available globally. In that case,
you must do the following before anybody can import functions from "File::ShareDir":
use File::ShareDir::PAR 'global';
WARNING
This module contains highly experimental code. If you want to load modules from ".par" files using PAR and then access their shared
directory using "File::ShareDir", you probably have no choice but to use it. But beware, here be dragons.
DESCRIPTION
"File::ShareDir::PAR" provides the same functionality as File::ShareDir but tries hard to be compatible with PAR packaged applications.
The problem is, that the concept of having a distribution or module specific share directory becomes a little hazy when you're loading
everything from a single file. PAR uses an @INC hook to intercept any attempt to load a module. File::ShareDir uses the directory
structure that is typically found in the directories that are listed in @INC for storing the shared data. In a "PAR" environment, this is
not necessarily possible.
When you call one of the functions that this module provides, it will take care to search in any of the currently loaded ".par" files
before scanning @INC. This is the same order of preference you get for loading modules when PAR is in effect. If the path or file you are
asking for is found in one of the loaded ".par" files, that containing ".par" file is extracted and the path returned will point to the
extracted copy on disk.
Depending on how you're using PAR, the files that are extracted this way are either cleaned up after program termination or cached for
further executions. Either way, you're safe if you use the shared data as read-only data. If you write to it, your changes may be lost
after the program ends.
For any further usage information, including the list of exportable functions, please refer to the documentation of File::ShareDir.
SUPPORT
Bugs should always be submitted via the CPAN bug tracker
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-ShareDir-PAR>
For other issues, contact the PAR mailing list: <par@perl.org>
AUTHOR
Steffen Mueller <smueller@cpan.org>
The code was adapted from Adam Kennedy's work on "File::ShareDir"
SEE ALSO
File::ShareDir, File::HomeDir, Module::Install, Module::Install::Share
COPYRIGHT AND LICENSE
Copyright (c) 2008-2010 Steffen Mueller This program is free software; you can redistribute it and/or modify it under the same terms as
Perl itself.
The portions of code that were copied from "File::ShareDir" are:
Copyright (c) 2005, 2006 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as
Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.1 2011-03-08 File::ShareDir::PAR(3pm)