Drop the escaped double quotes in find's "starting point". find does allow multiple "starting points", BTW.
Great, thanks! now i don't get any errors, but also the script is not working. Nothing is happening, no error codes.
Obviously i must be missing something.
1. If I have a file-yyyymmdd.dat in a directory DATA1, then how do I move this file to directory DATA2 and the file name change to file-yyyymmdd.dat.currenttime
I can manual do this
$mv fileA-yyyymmdd.dat ./DATA2/fileA-yyyymmdd.dat.`date +%Y%m%d%H%M%S`
but how do I move all of the files in... (1 Reply)
I am connecting to a remote server (Unix) and doing a ftp dowmload of files. The script (VB script) works fine except for not being able to move the downloaded files on the remote server to another folder.
I need to move all files with an .asc extesnion from folder "tovecellio_edi" to folder... (1 Reply)
Hi Friends,
Below is my requirement and i am not clear how to approach this issue in unix programming.
I have a folder with 2500 files. The files are in below format.
1234_name1.txt
1234_name123.txt
4567_name1.txt
4567_name123.txt
and i need a program which will read each file from this... (5 Replies)
I have multiple subfolders with multiple jpg
I want the group of files in each subfolder renamed to their index number (3 digits) in the folder, so:
folder/a.jpg = folder/001.jpg
folder/b.jpg = folder/002.jpg
folder/c.jpg = folder/003.jpg
folder2/1.jpg = folder2/001.jpg
folder2/2.jpg =... (2 Replies)
Hi,
I have a sub directory with a number of files and folders. What i want is a subdirectory with just folders and not files for cleanliness sake. So I want to move the files into the new folder but keep the folders in the same place. Move all files (but not folders) to new folder.
I am... (4 Replies)
Hi,
I have already created the tar files. which consist of some log files and Audit.csv
plz see the below code for that
================================================
tar -Pczf ARCH/${arc_date}.tgz $LOG/*.log $REYE/CEP/FiAdapter/Audit.${arc_date}.csv
... (3 Replies)
Hello!
I am new to this. I have many files from b_ap00 to b_ap80, and I need to move them to folder 00 to 80 respectively, where b_ap00 is in folder 00, b_ap01 is in folder 01.
On top of this, I need to rename the file once they are inside the folder to b_ot, and subsequently run it (ifort -o... (8 Replies)
How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ?
---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ----------
Ok. Got it.
mv /A/*/ /B/ (1 Reply)
Hey guys,
I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output)
#!/bin/bash -l
#SBATCH -p node
#SBATCH -A <projectID>
#SBATCH -n 16
#SBATCH -t 7-00:00:00
#SBATCH --mem=128GB
#SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
LEARN ABOUT SUSE
archive::zip::memberread
Archive::Zip::MemberRead(3) User Contributed Perl Documentation Archive::Zip::MemberRead(3)NAME
Archive::Zip::MemberRead - A wrapper that lets you read Zip archive members as if they were files.
SYNOPSIS
use Archive::Zip;
use Archive::Zip::MemberRead;
$zip = Archive::Zip->new("file.zip");
$fh = Archive::Zip::MemberRead->new($zip, "subdir/abc.txt");
while (defined($line = $fh->getline()))
{
print $fh->input_line_number . "#: $line
";
}
$read = $fh->read($buffer, 32*1024);
print "Read $read bytes as :$buffer:
";
DESCRIPTION
The Archive::Zip::MemberRead module lets you read Zip archive member data just like you read data from files.
METHODS
Archive::Zip::Member::readFileHandle()
You can get a "Archive::Zip::MemberRead" from an archive member by calling "readFileHandle()":
my $member = $zip->memberNamed('abc/def.c');
my $fh = $member->readFileHandle();
while (defined($line = $fh->getline()))
{
# ...
}
$fh->close();
Archive::Zip::MemberRead->new($zip, $fileName)
Archive::Zip::MemberRead->new($zip, $member)
Archive::Zip::MemberRead->new($member)
Construct a new Archive::Zip::MemberRead on the specified member.
my $fh = Archive::Zip::MemberRead->new($zip, 'fred.c')
setLineEnd(expr)
Set the line end character to use. This is set to
by default except on Windows systems where it is set to
. You will only need
to set this on systems which are not Windows or Unix based and require a line end diffrent from
. This is a class method so call as
"Archive::Zip::MemberRead"->"setLineEnd($nl)"
rewind()
Rewinds an "Archive::Zip::MemberRead" so that you can read from it again starting at the beginning.
input_record_separator(expr)
If the argumnet is given, input_record_separator for this instance is set to it. The current setting (which may be the global $/) is
always returned.
input_line_number()
Returns the current line number, but only if you're using "getline()". Using "read()" will not update the line number.
close()
Closes the given file handle.
buffer_size([ $size ])
Gets or sets the buffer size used for reads. Default is the chunk size used by Archive::Zip.
getline()
Returns the next line from the currently open member. Makes sense only for text files. A read error is considered fatal enough to
die. Returns undef on eof. All subsequent calls would return undef, unless a rewind() is called. Note: The line returned has the
input_record_separator (default: newline) removed.
read($buffer, $num_bytes_to_read)
Simulates a normal "read()" system call. Returns the no. of bytes read. "undef" on error, 0 on eof, e.g.:
$fh = Archive::Zip::MemberRead->new($zip, "sreeji/secrets.bin");
while (1)
{
$read = $fh->read($buffer, 1024);
die "FATAL ERROR reading my secrets !
" if (!defined($read));
last if (!$read);
# Do processing.
....
}
AUTHOR
Sreeji K. Das, <sreeji_k@yahoo.com> See Archive::Zip by Ned Konz without which this module does not make any sense!
Minor mods by Ned Konz.
COPYRIGHT
Copyright 2002 Sreeji K. Das.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.1 2009-06-30 Archive::Zip::MemberRead(3)