Then your sample output is misleading, and the code given should work as desired.
However, with one small and one large file, that code is suboptimal. It made more sense to read the small file's values into an array and then loop through the array for every large file's line...
Dear sir, I cannot thank you enough for your help.
I have what I have been looking for....thanks to you.
Just as a summary, this is the complete example:
Note: I have updated first file with F and second file with 11....to see how it works.
For the real purpose of the script, first file I am going to use is about 5000 lines long, and second is 3500 lines long....just to update you with the real info.
Dear RudiC, if you think that this code can run more smoothly, I kindly ask you to offer such solution.
The following input needs to be manipulated as follows:
INPUT from file or results of command:
============start:
Medium identifier : a45c0213:47eb5485:0aec:0321
Medium label : SQL Disk_11516
Location :
Protected : None ... (2 Replies)
I need to write a shell script which combines/joins 3 text files into one file. Do i put the txt files in the same folder as my script? Here is what i have:
#!/bin/bash
file1=$1
file2=$2
file3=$3
out="output.txt"
count=0
if
then
echo "$(basename $0) file1 file2 file3"
... (3 Replies)
I have 2 text files, both have one simple, single column. The 2 files might be the same length, or might not, and if not, it's unknown which one would be longer.
For this example, file1 is longer:
---file1
Joe
Bob
Mary
Sally
Fred
Elmer
David
---file2
Tomato
House
Car... (3 Replies)
hi,
I want to combine two lines in same file. If the line ends with '&' it should belongs to previous line only
Here i am writing example.
Ex1:
line 1 : return abcdefgh&
line 2 : ijklmnopqr&
line 3 : stuvw&
line 4 : xyz
output should be
line 1: return abcdefghijklmnopqrstuvwxyz
... (11 Replies)
Hi All
I am trying to combine columns from multiple text files into a single file using paste command but the record length being unequal in the different files the data is running over to the closest empty cell on the left. Please see below.
What can i do to resolve this ?
File 1 File... (15 Replies)
how to combine text files in new file and be separated by commas :
example:
f1.txt
1
2
3
f2.txt
x
y
z
f3.txt
m
n
o
i need output to be
fnew.txt
1,x,m (9 Replies)
Hi! I'm trying to take multiple text files (6), which have text on some lines but not others, and combine them. I'd also like to make the values in one column of some of the files (files 4-6) negative. I'm trying to write a short script (see below) as I have to do this with a large number of... (2 Replies)
Hi All,
I have three separate text files which has only one line and i want to combine these lines in one text file which will have three lines.
cat file1.txt
abc
cat file2.txt
1265 6589 1367
cat file3.txt
0.98 0.36 0.5
So, I want to see these three lines in the... (9 Replies)
Hi
I use Ubuntu 14.04 LTS and bash shell.
I need help to write a script to combine two text files. The first file is FIRST.txt
<Text Text_ID="10155645315851111_10155645333076543" From="460350337461111" Created="2011-03-16T17:05:37+0000" use_count="123">This is the first text</Text>
<Text... (15 Replies)
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT DEBIAN
mail::server::imap4::list
Mail::Server::IMAP4::List(3pm) User Contributed Perl Documentation Mail::Server::IMAP4::List(3pm)NAME
Mail::Server::IMAP4::List - folder related IMAP4 answers
SYNOPSIS
my $imap = Mail::Server::IMAP4::List->new
( folders => $folders # Mail::Box::Identity
, inbox => $inbox # Mail::Box
, delimiter => '#'
);
my $imap = Mail::Server::IMAP4::List->new(user => $user);
print $imap->list(...); # for LIST command
METHODS
Constructors
Mail::Server::IMAP4::List->new(USER)
Create a (temporary) object to handle the LIST requests for a certain user, based upon a set of folders. The data is kept by
Mail::Box::Identity and Mail::Box::Collection objects, which mean that the folders will not be opened to answer these questions.
-Option--Default
delimeter '/'
folders <from user>
inbox <from user>
user <undef>
delimeter => STRING|CODE
Either the constant delimiter, or a code reference which will get passed a folder name and should return the delimiter string used in
that name. If that folder name is empty, the default delimiter must be reported. See delimiter() for an example.
folders => OBJECT
You need to specify either a set of folders explicitly or via the user. Some Mail::Box::Identity OBJECT is needed.
inbox => BOOLEAN
For now, only used to see whether there is an inbox, so a truth value will do. This may change in the future. By default, the flag
is set if "$user-"inbox> is defined.
user => OBJECT
A Mail::Box::Manage::User OBJECT, representing the user who's folders must get reported.
Attributes
$obj->delimiter([FOLDERNAME])
Returns the delimiter string. The foldername is only required when a CODE reference was specified at initiation.
example: setting-up an IMAP4 delimeter
sub delim($)
{ my $path = shift;
my ($delim, $root)
= $path =~ m/^(#news.)/ ? ('.', $1)
= $path =~ m!^/! ? ('/', '/')
: ('/', '');
wantarray ? ($delim, $root) : $delim;
}
my $list = Mail::Server::IMAP4::List->new(delimiter => &delim, ...);
print $list->delimiter('abc/xyz'); # returns a / (slash) and ''
print $list->delimiter('#news.feed'); # returns a . (dot) and $news.
print $list->delimiter(''); # returns default delimiter
$obj->folders()
Returns the Mail::Box::Identity of the toplevel folder.
$obj->inbox()
Returns the Mail::Box or filename of the INBOX.
$obj->user()
Returns the Mail::Box::Manage::User object, if defined.
IMAP Commands
$obj->list(BASE, PATTERN)
IMAP's LIST command. The request must be partially decoded, the answer will need to be encoded.
example: using IMAP list
my $imap = Mail::Server::IMAP4::List->new(delimiter => &delim, ...);
local $" = ';';
my @lines = $imap->list('', ''); # returns the default delimiter
print ">@{$lines[0]}<"; # >(Noselect);/;<
my @lines = $imap->list('#news',''); # specific delimiter
print ">@{$lines[0]}<"; # >(Noselect);.;<
my @lines = $imap->list('top/x/', '%');
print ">@$_<," foreach @lines; # >();/;/tmp/x/y<,>(Marked);/;/tmp/x/z<
DETAILS
See
RFC2060: "Internet Message Access Protocol IMAP4v1"
sections 6.3.8 (LIST question) and 7.2.2 (LIST answer)
SEE ALSO
This module is part of Mail-Box distribution version 2.105, built on May 07, 2012. Website: http://perl.overmeer.net/mailbox/
LICENSE
Copyrights 2001-2012 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2012-05-07 Mail::Server::IMAP4::List(3pm)