Sponsored Content
Full Discussion: doing grep inside perl file
Top Forums Shell Programming and Scripting doing grep inside perl file Post 302233571 by era on Monday 8th of September 2008 04:19:27 AM
Old 09-08-2008
I cannot reproduce the problem here, the single quotes around the file name should already have fixed that. Also the error message looks incomplete. Is that really the whole message? Which platform is this?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep ^M in file using perl script....

hi i am using perl on windows ( active state perl 5.8 ) and i want to check for Control-M (^M) in file. files to be checked are in unix format so new line character is (\n). This perl script is called from Batch file ( windows .BAT file ) my script is while (<PROGRAM>) { ... (12 Replies)
Discussion started by: zedex
12 Replies

2. UNIX for Dummies Questions & Answers

how to get the output of a grep command to a file inside a shell script

hi, i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (1 Reply)
Discussion started by: kripssmart
1 Replies

3. Shell Programming and Scripting

how to redirect the output of a grep command to a file inside a shell script

hi, i wat to get the output of a grep command in a file. but when i am trying out the same grep command in the unix prompt its working fine.. i am getting the output properly.. but when i am writing the same command inside my shell script , its just creating a new output file with no contents... (11 Replies)
Discussion started by: kripssmart
11 Replies

4. Shell Programming and Scripting

grep inside the zip file

i have to grep a particular pattern say "meter number" in 100s of zip files file1.zip : : : : file100.zip how to achive this? cat *.zip | grep "meter number" also i dnt want to unzip and then grep it...... hope i made myself clear. thanks in advance (5 Replies)
Discussion started by: ali560045
5 Replies

5. UNIX for Advanced & Expert Users

how to grep/read a file inside compressed tgz without extract?

Hi all, I would like to ask whether in Unix shell/perl have any functions or command to allow grep/cat/read a file inside compressed .tgz without extract it? I know we can tar tvf a compressed tgz but this only allow we read the path/filename contained inside the tarball. If we want to read... (3 Replies)
Discussion started by: mayshy
3 Replies

6. Shell Programming and Scripting

Opening File names with spaces inside it !- PERL

I developed a perl code..And the excerpt from it is given below... open(HANDLE,$cmp_path) ; #reading the xml file from the file path while($file_path = <HANDLE>) I have list of XML files to read from a folder. It has some spaces inside the name of the file...I used "\"... (2 Replies)
Discussion started by: gameboy87
2 Replies

7. Shell Programming and Scripting

How to grep the contents inside a tar file

Hi All I have searched the possibility of this options everywhere but am unable to find it in any forum. I have a tar file inside which there are n number of files and i dont know them. I need to grep a word inside the tar file and need to know in which file the word resides. > cat a... (2 Replies)
Discussion started by: Whiteboard
2 Replies

8. Shell Programming and Scripting

Perl - Grep open file more then once.

Hi, I am using File::Find to go through a very large tree. I am looking for all xml files and open only those that contain a tag <Updated>. I then want to capture the contents of two tags <Old> and <New>. My problem is, after I open the file and do the first grep for <Updated> (which does... (3 Replies)
Discussion started by: OldGaf
3 Replies

9. Shell Programming and Scripting

Search inside a file, PERL

HEllo!! I need a script in perl that see inside a file(file.txt) that has only one row. The row contains only this text: logs_yearly = 20120628113345 I want that the script does this: "Search in the file, if the date 20120628 is actual date" Thank you!! ---------- Post... (4 Replies)
Discussion started by: super_sun
4 Replies

10. Shell Programming and Scripting

Source.cshrc file inside Perl

I have a file which is basically .cshrc It contains lines such as: setenv <variable> <value>... set path=(<dir> <dir>) source <another_file>... (1 Reply)
Discussion started by: kshitij
1 Replies
newsbody(1)							   User Manuals 						       newsbody(1)

NAME
newsbody - Run a program on the body of a mail or news message SYNOPSIS
newsbody [-fhqsv] [-k headername ] -n message -p program [-- [ arguments... ]] DESCRIPTION
newsbody copies the body of a news or email article in message to a temporary file (called the bodyfile) and then calls program with its arguments. program is supposed to somehow change the bodyfile. It can for instance be a spell checker. Afterwards the possibly changed body is remerged with the headers and copied back into the message. If message is specified as - then newsbody will act as a filter, i.e. standard input and standard output will be used. %f in the arguments will be expanded to the name of the bodyfile, or - if the -f option is used. Use %% for a real % character. OPTIONS
-f The called program is a filter so don't make a temporary file, but pipe the body to its standard input and read it back from its standard output. -h Keep the entire header. This flag can also be used if newsfile doesn't have a header at all. -q Also remove quotes before filtering the body. Lines starting with > are considered quotes. -s Also remove signature before filtering the body. -k headername Keep these header lines in the bodyfile. Multiple -k flags are allowed. -v Print the version and exit. FILES
newsbody uses one or two temporary files with names given by the mkstemp(3) or the tmpnam(3) function. BUGS
If some system call gives an unexpected error newsbody will stop immediately with an error message leaving its temporary files. AUTHOR
Byrial Jensen <byrial@image.dk> SEE ALSO
pospell(1). Unix APRIL 2000 newsbody(1)
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy