Hello,
I am trying to replace a string with a paramter given along with the script.
I am replacing application1 to application2 with the script:
./change_app.sh application2
change_app.sh:
#!/bin/ksh
grep $1 applications.dat 2>&1 >/dev/null
echo $1
file=pckage.new
sed 's/Name:... (5 Replies)
Hi
i need to print pathname in which the string present using 'find' command
sample output like this
Pathname String to be searched
---------- --------------------
/usr/test/myfile get
/opt/test/somefile get
Thanks in... (4 Replies)
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
I know that in oracle the is a way to write to ignore the dupkey, something like
/*+ ignore_row_on_dupkey_index(tab, index_tab) */
Is there a way to do the same thing but with unix commands? I think there's a way with WHENEVER SQLERROR EXIT SQL.SQLCODE but i'm not sure and i don't know how do... (3 Replies)
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Dear All,
I have to find a way to reorganize a table file according to the last column. The input file looks like this:
cat Input1.txt:
ID:12:23:00Q EU232 2342 234 123 231 aa1;ab2
ID:11:22:00E EU112 1232 211 112 233 ab2;ac3
ID:19:24:00S EU121 569 ... (7 Replies)
Hi Team,
Please help me with a command which greps the exact match of the string which I am searching in a file.
For examplecat > file
abc
abcd
def
ghi
In the above file I just wanted to display abc which is first entry.
When I execute grep command cat file | grep "abc" it results... (3 Replies)
Hi there,
I am new to Unix and had below requirement to finish my task.
I have file1.dat which has data as shown below.
case1.txt
case2.txt
case3.txt
case4.txt
file1.dat has only file names
I have folder which has above files mentioned in file1.dat
./all_files
case1.txt... (6 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT DEBIAN
email::folder::mbox
Email::Folder::Mbox(3pm) User Contributed Perl Documentation Email::Folder::Mbox(3pm)NAME
Email::Folder::Mbox - reads raw RFC822 mails from an mbox file
SYNOPSIS
This isa Email::Folder::Reader - read about its API there.
DESCRIPTION
Does exactly what it says on the tin - fetches raw RFC822 mails from an mbox.
The mbox format is described at http://www.qmail.org/man/man5/mbox.html
We attempt to read an mbox as through it's the mboxcl2 variant, falling back to regular mbox mode if there is no "Content-Length" header to
be found.
OPTIONS
The new constructor takes extra options.
"eol"
This indicates what the line-ending style is to be. The default is "
", but for handling files with mac line-endings you would want
to specify "eol => "x0d""
"jwz_From_"
The value is taken as a boolean that governs what is used match as a message seperator.
If false we use the mutt style
/^From S+s+(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)/
/^From (?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)/;
If true we use
/^From /
In deference to this extract from <http://www.jwz.org/doc/content-length.html>
Essentially the only safe way to parse that file format is to
consider all lines which begin with the characters ``From ''
(From-space), which are preceded by a blank line or
beginning-of-file, to be the division between messages. That is, the
delimiter is "
From .*
" except for the very first message in the
file, where it is "^From .*
".
Some people will tell you that you should do stricter parsing on
those lines: check for user names and dates and so on. They are
wrong. The random crap that has traditionally been dumped into that
line is without bound; comparing the first five characters is the
only safe and portable thing to do. Usually, but not always, the next
token on the line after ``From '' will be a user-id, or email
address, or UUCP path, and usually the next thing on the line will be
a date specification, in some format, and usually there's nothing
after that. But you can't rely on any of this.
Defaults to false.
"seek_to"
Seek to an offset when opening the mbox. When used in combination with ->tell you may be able to resume reading, with a trailing wind.
"tell"
This returns the current filehandle position in the mbox.
AUTHORS
Simon Wistow <simon@thegestalt.org>
Richard Clamp <richardc@unixbeard.net>
COPYING
Copyright 2003, Simon Wistow
Distributed under the same terms as Perl itself.
This software is under no warranty and will probably ruin your life, kill your friends, burn your house and bring about the apocolapyse.
SEE ALSO
Email::LocalDelivery, Email::Folder
perl v5.10.0 2009-07-27 Email::Folder::Mbox(3pm)