01-25-2006
Quote:
Originally Posted by linuxpenguin
I tried this snipped to identify if the file name extension has numeric character. let me know if this snippet ring any bells.
'
Hi. Thanks for your help. I should've mentioned that the string of text after the ALPHANUM phrase are not extensions. They have their own extensions actually, like .txt. Sorry for not specifying this before.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've got a bunch of files called oldabc, olddef etc.
i want to copy these to be abc, def....
I can do this with file extensions....but can get the logic to work for prefixes. All the files I am interested in have a prefix of 'old'.
This loop is no good for me....it looks at the content... (2 Replies)
Discussion started by: peter.herlihy
2 Replies
2. Shell Programming and Scripting
Remove prefix using awk
File:
nawk -F"|" '{if ($1 ~ /^xyz./) print; else { gsub(.*\..*, \..*, $1) ;print }}' file
Error:
ouput required: (5 Replies)
Discussion started by: pinnacle
5 Replies
3. Shell Programming and Scripting
Hello Gurus,
O/S RHEL4
I have a requirement to compare two linux based directories for duplicate filenames and remove them. These directories are close to 2 TB each. I have tried running a:
Prompt>diff -r data1/ data2/
I have tried this as well:
jason@jason-desktop:~$ cat script.sh ... (7 Replies)
Discussion started by: jaysunn
7 Replies
4. Shell Programming and Scripting
Hi,
I'm using a .ksh script to split one file into multible files by checking for the prefix per line. It works perfekt (thanks again for anyone involved in helping me with that ;)), but I want to remove the prefix per line too. Means only the line information itself should remain in the... (7 Replies)
Discussion started by: spidermike
7 Replies
5. Shell Programming and Scripting
hi all,
I want to remove filenames beginning with multiple dots.how I can do this.
Thanks in advance (5 Replies)
Discussion started by: sriharsharavi
5 Replies
6. UNIX for Dummies Questions & Answers
I have a group of files in different directories with characters such as " ? : in the file names. How do I find these files and remove these characters on mass?
Thanks (19 Replies)
Discussion started by: barrydocks
19 Replies
7. Shell Programming and Scripting
Hi,
I have files like below, In files coming as spaces. Before transfering those files into ftp server. I want to remove the spaces and then can transfer the files into unix server.
e.g: filenames are
1) SHmail _profile001_20120908.txt
2) SHmail_profile001 _20120908.txt
3) sh... (3 Replies)
Discussion started by: kirankumar
3 Replies
8. Shell Programming and Scripting
Dear all,
I have a dir structure like
main_dir
At_nn Ag_js Nf_hc ....
mcd32 mgd43... mcd32 mgd43... mcd32 mgd43...
and each subdir (e.g. mcd32, mgd43) contains files.
Now, i... (15 Replies)
Discussion started by: yogeshkumkar
15 Replies
9. Shell Programming and Scripting
hi,
i have a directory which contains some files and a subdirectory. i am writing only the files names to a file using the below code.
ls -ltr | grep "^-" | awk '{print $NF}' > /home/file_list$$
cat /home/file_list$$
s1_abc.txt
s2_def.xls
s3_def.xls
as you can see there is one .txt... (7 Replies)
Discussion started by: Little
7 Replies
10. Shell Programming and Scripting
Dear All,
assume i have a file with content:
<Start>6000</Start>
<Stop>7599</Stop>
the output is:
6000
7000
7100
7200
7300
7400
7599
how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix.
Thanks
Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
LEARN ABOUT DEBIAN
courier::filter::logger::syslog
Courier::Filter::Logger::Syslog(3pm) User Contributed Perl Documentation Courier::Filter::Logger::Syslog(3pm)
NAME
Courier::Filter::Logger::Syslog - Syslog logger for the Courier::Filter framework
SYNOPSIS
use Courier::Filter::Logger::Syslog;
my $logger = Courier::Filter::Logger::Syslog->new();
# For use in an individual filter module:
my $module = Courier::Filter::Module::My->new(
...
logger => $logger,
...
);
# For use as a global Courier::Filter logger object:
my $filter = Courier::Filter->new(
...
logger => $logger,
...
);
DESCRIPTION
This class is a syslog logger class for use with Courier::Filter and its filter modules. It is derived from
Courier::Filter::Logger::IOHandle.
Constructor
The following constructor is provided:
new: returns Courier::Filter::Logger::Syslog; throws Courier::Error
Creates a new logger that logs messages to syslog.
Instance methods
The following instance methods are provided, as inherited from Courier::Filter::Logger::IOHandle:
log_error($text): throws Perl exceptions
Logs the error message given as $text (a string which may contain newlines).
log_rejected_message($message, $reason): throws Perl exceptions
Logs the Courier::Message given as $message as having been rejected due to $reason (a string which may contain newlines).
SEE ALSO
Courier::Filter::Logger::IOHandle, Courier::Filter::Logger, Courier::Filter::Overview.
For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview.
AUTHOR
Julian Mehnle <julian@mehnle.net>
perl v5.14.2 2011-12-27 Courier::Filter::Logger::Syslog(3pm)