Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Replacing duplicated extensions, like .rtf.rtf Post 302923997 by Don Cragun on Wednesday 5th of November 2014 03:22:57 PM
Old 11-05-2014
Quote:
Originally Posted by OmarKN
Code:
 mv ${filename} ${filename%.rtf}

So the found files are moved (changed), but what does % do?

/
with best regards,
Omar KN
Stockholm, Sweden
It removes .rtf from the end of the name.

And, whether or not your pathnames might contain space or tab characters, you should always write your code to allow for that possibility:
Code:
find . -type f -name "*.rtf.rtf" | while read -r path
do      mv "${path}" "${path%.rtf}"
done

This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

converting PDF to text, rtf doc format

Hi all Is there any program which can convert PDF to word processor file ? If the PDF has smart quotes, bullet icons, copyright and trademark symbols, etc. what happens to them intext format? So ideally would like to conver into rtf or doc. Thanks SS (1 Reply)
Discussion started by: saurya_s
1 Replies

2. Windows & DOS: Issues & Discussions

RTF files can they be converted once they are on linux system

:D mount -t vfat /dev/hda1 /mnt my dillemma is simple i have psion 5 mx wich is an epoc type machine not only does it only work on windows as far as I know but I have to convert the files (the usual stuff!) sometimes a humen error happens and the files that I want to transfer to the linux drive... (7 Replies)
Discussion started by: moxxx68
7 Replies

3. Shell Programming and Scripting

embedded exe file into rtf file

Hi All I want a method in shell script which will embed the exe file into rtf file si that the rtf file can be open in word and so my exe. Actually what is happening in my system at present : The report in my system is a self-extracting Zip file with filetype '.EXE'. Double clicking... (1 Reply)
Discussion started by: rawatds
1 Replies

4. UNIX for Advanced & Expert Users

Can root ID be duplicated

Hi, I have the root id and the uid is always 0 for the root. Can i create another user say admin with the uid as 0? If so will it have the same privilege as that of user. Will there be any effect while doing this? lorcan (6 Replies)
Discussion started by: lorcan
6 Replies

5. UNIX for Dummies Questions & Answers

Problem to send rtf inline body

how send an rtf file as inline body of email (not as an attachment) sendmail/mailx < test.rtf is not working (7 Replies)
Discussion started by: srik_ux
7 Replies

6. UNIX and Linux Applications

looking for convert rtf to pdf utility

Hello all i have server that needs to add the ability to convert rtf files to pdf what you recommend me to use ( not open office please ) its spouse to process lots of files . something i can wrap in code and use (2 Replies)
Discussion started by: umen
2 Replies

7. Shell Programming and Scripting

how to convert XLS to CSV and DOC/RTF to TXT

Hi, i don't know anything about PERL. Can anyone help me providing PERL scripts for 1. converting XLS to CSV (and vice-versa) 2. converting DOC/RTF to TXT Thanks much Prvn (1 Reply)
Discussion started by: prvnrk
1 Replies

8. Shell Programming and Scripting

Replacing multiple extensions

HI, I have some csv files with mutiple extensions, I want to remove all the extensions and keep only the .csv extension. anybody can suggest me how to do this. source files 1.txt.csv.txt.csv.csv.txt.csv 2.csv.txt.csv.txt.csv.txt target 1.csv 2.csv --Wang (1 Reply)
Discussion started by: wangkc
1 Replies

9. UNIX for Dummies Questions & Answers

Duplicated UID

Hi folks! I need you help to discover what's the impact of a duplicated UID in an operating system. What's the meaning when someone put in different users the same UID? (3 Replies)
Discussion started by: phcostabh
3 Replies

10. Programming

RTFEditorKit - Write to RTF File

Hi, I am looking at writing the BLOB from database which is an rtf data to write to RTF file. I am trying to use the RTFEditorKit for the same and was struck with the write API it provides. write API takes the outstream and Document, all I have is Inputstream or bytestream from database -... (5 Replies)
Discussion started by: vijaykrc
5 Replies
ABIWORD(1)						      General Commands Manual							ABIWORD(1)

NAME
abiword -- flexible cross-platform word processor SYNOPSIS
abiword [OPTIONS] [FILENAME...] DESCRIPTION
AbiWord is a full-featured, efficient word processing application suitable for a wide range of word processing tasks, and extensible with a variety of plugins. It integrates with enchant(1) to provide spell-checking. OPTIONS
-g WxH[+X+Y], --geometry=WxH[+X+Y] Specifies window geometry at startup. -E PLUGIN, --plugin=PLUGIN Execute the specified plugin instead of the main application. --import-extension=EXT Import the given file as if it had extension EXT, overriding automatic file type detection. -u PROFILE, --userprofile=PROFILE Use PROFILE instead of the default ~/.AbiSuite/AbiWord.Profile to read and store settings. -t DEST, --to=DEST Convert the given file to another format, writing the result to DEST. The format of DEST is determined by its extension. See also --to=FORMAT and --to-name. -t FORMAT, --to=FORMAT Convert the given files(s) to the given format. Unless explicitly specified with --to-name, the original filename will be used (with a different extension, if necessary). See also EXAMPLES. The more popular values for FORMAT include: abw Abiword XML format (zabw for gzip, bzabw for bzip2 compression) dbk DocBook XML doc Microsoft Word binary format docx Office Open XML (newer Microsoft Word versions) html Hypertext Markup Language kwd KWord odt OpenDocument Text pdf Portable Document Format rtf Rich Text Format sxw OpenOffice.org Writer 1.0 txt Plain text --to-name=DEST Only useful in conjunction with --to=FORMAT. Specifies where the converted document shall be written to. --verbose=LEVEL Set level of verbosity [0-2], 2 giving the most detailed output. -h, --help Display a short help message and exit. --version Report the version of AbiWord. EXAMPLES
To convert the document example.abw to RTF: abiword --to=rtf example.abw The resulting file will be named example.rtf. To print a document: abiword --to=ps --to-name=fd://1 FILENAME | lp REPORTING BUGS
Report bugs to the Bugzilla bug tracking system at <http://bugzilla.abisource.com>. SEE ALSO
enchant(1) HISTORY
AbiWord was started in 1998 by AbiSource Inc., a company founded by SourceGear corporation. The initial plan was to build a free office suite named AbiSuite, encompassing word processing, spreadsheet and presentation applications. As they didn't have a usable product when their venture capital was up, the code already developed (namely AbiWord) was made open source. AbiWord development was subsequently taken over by volunteers and is driven by the community to date. AbiWord 2.8 2009-12-11 ABIWORD(1)
All times are GMT -4. The time now is 03:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy