10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a requirement to move zero byte files to an archive folder. I have the below script and it works fine if I run it from where the file is present. But when I run the script from different folder, I am getting error that file is not present. Please help.
#!/bin/ksh
... (11 Replies)
Discussion started by: Prasannag87
11 Replies
2. Programming
it still display header and footer
header
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 24 13:41:51 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real... (0 Replies)
Discussion started by: ment0smintz
0 Replies
3. UNIX for Dummies Questions & Answers
I want to delete the header and footer in the file by using sed for that i ran the below script and my text file looks like
emp.txt
# This file contain employee
# information
abc 12300 34 'FGH'
# This is confidential as per the firm rules.
my intention is to remove the header... (8 Replies)
Discussion started by: vmachava
8 Replies
4. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
5. Shell Programming and Scripting
Hi All
Can anyone please suggest me how to remove the last byte from a falt file .This is from the last line's last BYTE.
Please suggest me something.
Thank's and regards
Vinay (1 Reply)
Discussion started by: vinayrao
1 Replies
6. Shell Programming and Scripting
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)
Discussion started by: krishmaths
4 Replies
7. SCO
I have some HP4+ and HP5 printers printing from Unixware 7.1.4. The problem is that they print a page header with the date and page number. I can't seem to figure out how to stop this. These headers through the pagination off. (2 Replies)
Discussion started by: sladeburke
2 Replies
8. UNIX for Dummies Questions & Answers
I need to concatenate about a thousand files (using a loop) on a UNIX server. Also, each file has a header row which is to be removed. Which of the following would give better performance?
tail+2 <filename> or sed '1,1d' <filename>
Or is there another, faster way?
Thanks,
Kaus (4 Replies)
Discussion started by: kausmone
4 Replies
9. UNIX for Dummies Questions & Answers
All,
I am new to unix and i have the following requirement.
I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file..
Could... (35 Replies)
Discussion started by: ksrams
35 Replies
10. Shell Programming and Scripting
I would like to remove some lines from begining of file (header) and some lines from end of file (footer).
The header/footer lines generated by web-browser when the user upload a file to my webserver.
Example:
-----------------------------7d62af20c052c
Content-Disposition: form-data;... (2 Replies)
Discussion started by: seaky
2 Replies
File::Remove(3) User Contributed Perl Documentation File::Remove(3)
NAME
File::Remove - Remove files and directories
SYNOPSIS
use File::Remove 'remove';
# removes (without recursion) several files
remove( '*.c', '*.pl' );
# removes (with recursion) several directories
remove( 1, qw{directory1 directory2} );
# removes (with recursion) several files and directories
remove( 1, qw{file1 file2 directory1 *~} );
# trashes (with support for undeleting later) several files
trash( '*~' );
DESCRIPTION
File::Remove::remove removes files and directories. It acts like /bin/rm, for the most part. Although "unlink" can be given a list of
files, it will not remove directories; this module remedies that. It also accepts wildcards, * and ?, as arguments for filenames.
File::Remove::trash accepts the same arguments as remove, with the addition of an optional, infrequently used "other platforms" hashref.
SUBROUTINES
remove
Removes files and directories. Directories are removed recursively like in rm -rf if the first argument is a reference to a scalar that
evaluates to true. If the first arguemnt is a reference to a scalar then it is used as the value of the recursive flag. By default it's
false so only pass 1 to it.
In list context it returns a list of files/directories removed, in scalar context it returns the number of files/directories removed. The
list/number should match what was passed in if everything went well.
rm
Just calls remove. It's there for people who get tired of typing remove.
clear
The "clear" function is a version of "remove" designed for use in test scripts. It takes a list of paths that it will both initially delete
during the current test run, and then further flag for deletion at END-time as a convenience for the next test run.
trash
Removes files and directories, with support for undeleting later. Accepts an optional "other platforms" hashref, passing the remaining
arguments to remove.
Win32
Requires Win32::FileOp.
Installation not actually enforced on Win32 yet, since Win32::FileOp has badly failing dependencies at time of writing.
OS X
Requires Mac::Glue.
Other platforms
The first argument to trash() must be a hashref with two keys, 'rmdir' and 'unlink', each referencing a coderef. The coderefs will be
called with the filenames that are to be deleted.
SUPPORT
Bugs should always be submitted via the CPAN bug tracker
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Remove>
For other issues, contact the maintainer.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Some parts copyright 2006 - 2012 Adam Kennedy.
Taken over by Adam Kennedy <adamk@cpan.org> to fix the "deep readonly files" bug, and do some package cleaning.
Some parts copyright 2004 - 2005 Richard Soderberg.
Taken over by Richard Soderberg <perl@crystalflame.net> to port it to File::Spec and add tests.
Original copyright: 1998 by Gabor Egressy, <gabor@vmunix.com>.
This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.
perl v5.18.2 2012-03-18 File::Remove(3)