06-23-2011
remove the filename from a string
I have a string like this /Development/ST/st000001su/Outbound/Prod/PROD-732QCJ/63acf2caf91bc136cb9bcce8a85c7fa8/PGP/PGP.txt
I want to remove the PGP.txt and I want only the /Development/ST/st000001su/Outbound/Prod/MCFR-732QCJ/63acf2caf91bc136cb9bcce8a85c7fa8/PGP returned.
I saw an command called basename in this forum, but that gives the filename.
I dont need the filename but need the directory name.
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. UNIX for Dummies Questions & Answers
In a foreach loop I end up with $file containing the filename INCLUDING the whole path. I want this reduced to just the filename, but I can't seem to remember how I did it some years back. I am sure I can do it with "sed", but I am pretty sure I have seen a simpler command.
Anyone?
borgeh (3 Replies)
Discussion started by: borgeh
3 Replies
3. Shell Programming and Scripting
Hi all,
Can I edit this script:
find . -type f | while read i;do && mv "$i" "${i//abc/}" ;done
so that it will not only take out abc from the filename but also take out any numbers that might be in the filename as well.
An example would be,
Input:
filename abc 2009.mov
Output:... (7 Replies)
Discussion started by: Monkey Dean
7 Replies
4. Shell Programming and Scripting
hi
how to remove extensions of a file.. suppose i have a filename "gtk2-2.4.13-24.el4.x86_64.rpm" and i want the file name as "gtk2-2.4.13-24.el4" means want to remove last two "." extensions of a file
can anyone help me in this
thanks in advance
srik (12 Replies)
Discussion started by: srikanthg
12 Replies
5. Shell Programming and Scripting
Hi,
I have a list of paths with files at the end. How can strip off filenames.
This is what I have:
/apps/test/abc/file.txt
/apps/new/home/daily/report.xml
/apps/old/home/weekly/out/test.sh
This is what I need:
/apps/test/abc/
/apps/new/home/daily/
/apps/old/home/weekly/out/
... (10 Replies)
Discussion started by: djanu
10 Replies
6. Linux
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Discussion started by: us_pokiri
1 Replies
7. Shell Programming and Scripting
Hi All,
I have different type of file (.txt,.csv,.xml) format in my current directory. My requirement is that I need to remove the last character from the file format.
Example
count.txt$
csp_rules.csv^
Date.xml~
Need Output:
count.txt
csp_rules.csv
Date.xml
How to do that?.... (5 Replies)
Discussion started by: suresh01_apk
5 Replies
8. Shell Programming and Scripting
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)
Discussion started by: JC_1
4 Replies
9. Shell Programming and Scripting
Hello,
I need some help with renaming some files by removing a certain portion of the filename.
The current file name is: ABC_2013186197_20130708_203556.95336
I need to remove the 5 digits after the first "_". The new file name should be:
ABC_197_20130708_203556.95336
I'm not quite... (5 Replies)
Discussion started by: bbbngowc
5 Replies
10. Shell Programming and Scripting
Hi All!
Please can someone help, I have a dir with the following files:
~-rw-r--r-- 1 emmuser users 2087361 Oct 16 15:50 MPGGSN02_20131007234519_24291.20131007
-rw-r--r-- 1 emmuser users 2086837 Oct 16 15:50 MPGGSN02_20131007233529_24272.20131007
-rw-r--r-- 1 emmuser ... (7 Replies)
Discussion started by: fretagi
7 Replies
LEARN ABOUT DEBIAN
claws-mail-pgpinline
CLAWS-MAIL-PGPINLI(1) CLAWS-MAIL-PGPINLINE Manual CLAWS-MAIL-PGPINLI(1)
NAME
claws-mail-pgpinline - Handling of PGP/Inline signed and/or encrypted mails.
DESCRIPTION
This manual page documents briefly the claws-mail-pgpinline plugin.
This manual page was written for the Debian distribution because the original program does not have a manual page.
claws-mail-pgpinline is a plugin (loadable module) for the Claws Mail mailer.
This plugin allows decrypting mails, verifying signatures and sign or encrypt your own mails using PGP/Inline.
It requires GnuPG and GPGME.
Notice this method for signing or encryption is deprecated and you probably should be using PGP/MIME, but it is still provided for
compatibility with user agents which are unable to handle the 10-year old PGP/MIME standard (being Outlook from Windows platform the most
noticeable example).
USAGE
Before using a plugin you must instruct Claws Mail to load it on startup.
For this you must go "Configuration" menu on main window toolbar, open "Plugins..." dialog, click on the "Load plugin..." button and
select the plugin file, named pgpinline.so, and press the "Open" button.
FILES
/usr/lib/claws-mail/plugins/pgpinline.so
The loadable module for claws-mail-pgpinline.
~/.gnupg/gpg.conf
Configuration file for GnuPG, read man gpg for details.
BUGS
Please use reportbug claws-mail-pgpinline for reporting Debian bugs for this package.
The upstream BTS can be found at http://www.thewildbeast.co.uk/claws-mail/bugzilla/index.cgi.
SEE ALSO
claws-mail(1), claws-mail-extra-plugins(1), claws-mail-pgpmime(1), gpg(1)
AUTHORS
The Claws Mail Team <theteam@claws-mail.org>
Wrote the claws-mail-pgpinline plugin.
Ricardo Mones <mones@debian.org>
Wrote this manpage for the Debian system.
COPYRIGHT
Copyright (C) 2008 Ricardo Mones
This manual page was written for the Debian system (but may be used by others).
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at
your option) any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
claws-mail-pgpinline September, 2008 CLAWS-MAIL-PGPINLI(1)