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::slurp::withinpolicy
File::Slurp::WithinPolicy(3pm) User Contributed Perl Documentation File::Slurp::WithinPolicy(3pm)NAME
File::Slurp::WithinPolicy - Applies filesystem policies to File::Slurp
SYNOPSIS
use File::Slurp::WithinPolicy qw(:all);
my $text = read_file( 'filename' );
my @lines = read_file( 'filename' );
write_file( 'filename', $text );
append_file( 'filename', $more_text );
overwrite_file( 'filename', $text );
my @files = read_dir( '/path/to/dir' );
DESCRIPTION
This provides the File::Slurp interface within a policy defined by File::Policy. By default, File::Policy is a no-op and this behaves
identically to File::Slurp. System administrators may want to override the default File::Policy implementation to enforce a local filesys-
tem policy (see File::Policy).
FUNCTIONS
read_dir
See "read_dir" in File::Slurp
read_file
See "read_file" in File::Slurp
write_file
See "write_file" in File::Slurp
append_file
See "append_file" in File::Slurp
overwrite_file
See "overwrite_file" in File::Slurp
EXPORTS
By default, nothing is exported. The ":all" tag can be used to export everything. Individual methods can also be exported.
SEE ALSO
File::Slurp, File::Policy
VERSION
$Revision: 1.4 $ on $Date: 2005/06/15 10:40:21 $ by $Author: simonf $
AUTHOR
John Alden <cpan _at_ bbc _dot_ co _dot_ uk>
COPYRIGHT
(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL.
See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt
perl v5.8.8 2005-06-15 File::Slurp::WithinPolicy(3pm)