Sponsored Content
Top Forums Shell Programming and Scripting UNIX :renaming the files present in the directory Post 302776909 by mr.zeratul on Thursday 7th of March 2013 05:25:37 AM
Old 03-07-2013
Hello everybody,

I'm still a newbie, but here's my attempt:

$ for i in * ; do mv $i uni${i##linu}; done
This User Gave Thanks to mr.zeratul For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

renaming files in a directory to lowercase

can anybody help me in renaming all the file in a directory to lowercase? script will be helpful. (1 Reply)
Discussion started by: vhariprasad
1 Replies

2. Shell Programming and Scripting

Renaming files as per directory

I have many files with duplicate names spread out over several tens of directories. I would like to mv them to the parent directory, but to avoid conflicting filenames I'd like to prefix each filename with the name of the directory it was in. For example, if this is my directory structure:... (2 Replies)
Discussion started by: dotancohen
2 Replies

3. UNIX for Dummies Questions & Answers

renaming files in the directory

suppose i have a few file like "a b c.txt" , "hello world.c" etc...(files that have space between them in their filenames). how do i change their filenames to "a_b_c.txt" and "hello_world.c" respectively? heres what i have tried...but failed $ find -name "*" -exec mv "{}" "`echo {} | tr "... (4 Replies)
Discussion started by: c_d
4 Replies

4. UNIX for Dummies Questions & Answers

Renaming files after their directory name in multiple sub directories

So I am not sure if this should go in the shell forum or in the beginners. It is my first time posting on these forums. I have a directory, main_dir lets say, with multiple sub directories (one_dir through onehundred_dir for example) and in each sub directory there is a test.txt. How would one... (2 Replies)
Discussion started by: robotsbite
2 Replies

5. Solaris

Not able to edit files present in mounted directory

I had mount from server A to server B. I am able to access the files present under server B. I can create new files on server B, but i am not able to edit the files which are already present. When i saw the permissions on those files it is 777. can some one tell me why i am not able to edit... (2 Replies)
Discussion started by: subbaraju
2 Replies

6. Solaris

what is the use of each login related files present in users home directory

# ls -l total 10 -rw-r--r-- 1 dummy2 other 140 Jun 19 21:37 local.cshrc -rw-r--r-- 1 dummy2 other 136 Jun 19 21:37 local.cshrc~ -rw-r--r-- 1 dummy2 other 157 Jun 19 21:37 local.login -rw-r--r-- 1 dummy2 other 178 Jun 19 21:37 local.profile... (6 Replies)
Discussion started by: chidori
6 Replies

7. Shell Programming and Scripting

Renaming multiple files in a directory

Hello, I would like to rename all available files in a directory from Filename to Filename_Normal. I tried to use below script but it is giving some error: #!/bin/sh for i in `ls` do echo Changing $i mv $i $i_Normal done Error received: Usage: mv src target or: mv ... (10 Replies)
Discussion started by: manishdivs
10 Replies

8. Shell Programming and Scripting

Checking in a directory how many files are present and basing on that merge all the files

Hi, My requirement is,there is a directory location like: :camp/current/ In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Discussion started by: srikanth_sagi
10 Replies

9. UNIX for Dummies Questions & Answers

Unable to find files, those can be present anywhere in the directory tree,based on its creation date

Hi I am unable to find files, those are present anywhere in the same directory tree, based on the creation date. I need to find the files with their path, as I need to create them in another location and move them. I need some help with a script that may do the job. Please help (2 Replies)
Discussion started by: sam192837465
2 Replies

10. Shell Programming and Scripting

Copying files from one directory to another, renaming duplicates.

Below is the script i have but i would like simplified but still do the same job. I need a script to copy files not directories or sub-directories into a existing or new directory. The files, if have the same name but different extension; for example 01.doc 01.pdf then only copy the .doc file. ... (1 Reply)
Discussion started by: Gilljambo
1 Replies
PDF::API2::Resource::BaseFont(3pm)			User Contributed Perl Documentation			PDF::API2::Resource::BaseFont(3pm)

NAME
PDF::API2::Resource::BaseFont - base font class METHODS
$font = PDF::API2::Resource::BaseFont->new $pdf, $name Returns a font resource object. $font = PDF::API2::Resource::BaseFont->new_api $api, $name Returns a font resource object. This method is different from 'new' that it needs an PDF::API2-object rather than a Text::PDF::File-object. $descriptor = $font->descrByData() Returns the fonts FontDescriptor key-structure based on the fonts data. FONT-MANAGEMENT RELATED METHODS $name = $font->fontname() Returns the fonts name (aka. display-name). $name = $font->altname() Returns the fonts alternative-name (aka. windows-name for a postscript font). $name = $font->subname() Returns the fonts subname (aka. font-variant, schriftschnitt). $name = $font->apiname() Returns the fonts name to be used internally (should be equal to $font->name). $issymbol = $font->issymbol() Returns the fonts symbol flag. $iscff = $font->iscff() Returns the fonts compact-font-format flag. TYPOGRAPHY RELATED METHODS
($llx, $lly, $urx, $ury) = $font->fontbbox() Returns the fonts bounding-box. $capheight = $font->capheight() Returns the fonts capheight value. $xheight = $font->xheight() Returns the fonts xheight value. $missingwidth = $font->missingwidth() Returns the fonts missingwidth value. $maxwidth = $font->maxwidth() Returns the fonts maxwidth value. $avgwidth = $font->avgwidth() Returns the fonts avgwidth value. $flags = $font->flags() Returns the fonts flags value. $stemv = $font->stemv() Returns the fonts stemv value. $stemh = $font->stemh() Returns the fonts stemh value. $italicangle = $font->italicangle() Returns the fonts italicangle value. $isfixedpitch = $font->isfixedpitch() Returns the fonts isfixedpitch flag. $underlineposition = $font->underlineposition() Returns the fonts underlineposition value. $underlinethickness = $font->underlinethickness() Returns the fonts underlinethickness value. $ascender = $font->ascender() Returns the fonts ascender value. $descender = $font->descender() Returns the fonts descender value. GLYPH RELATED METHODS
@names = $font->glyphNames() Returns the defined glyph-names of the font. $glNum = $font->glyphNum() Returns the number of defined glyph-names of the font. $uni = $font->uniByGlyph $char Returns the unicode by glyph-name. $uni = $font->uniByEnc $char Returns the unicode by the fonts encoding map. $uni = $font->uniByMap $char Returns the unicode by the fonts default map. $char = $font->encByGlyph $glyph Returns the character by the given glyph-name of the fonts encoding map. $char = $font->encByUni $uni Returns the character by the given unicode of the fonts encoding map. $char = $font->mapByGlyph $glyph Returns the character by the given glyph-name of the fonts default map. $char = $font->mapByUni $uni Returns the character by the given unicode of the fonts default map. $name = $font->glyphByUni $unicode Returns the glyphs name by the fonts unicode map. BEWARE: non-standard glyph-names are mapped onto the ms-symbol area(0xF000). $name = $font->glyphByEnc $char Returns the glyphs name by the fonts encoding map. $name = $font->glyphByMap $char Returns the glyphs name by the fonts default map. $width = $font->wxByGlyph $glyph Returns the glyphs width. $width = $font->wxByUni $uni Returns the unicodes width. $width = $font->wxByEnc $char Returns the characters width based on the current encoding. $width = $font->wxByMap $char Returns the characters width based on the fonts default encoding. $wd = $font->width $text Returns the width of $text as if it were at size 1. BEWARE: works only correctly if a proper perl-string is used either in native or utf8 format (check utf8-flag). @widths = $font->width_array $text Returns the widths of the words in $text as if they were at size 1. STRING METHODS
$utf8string = $font->utfByStr $string Returns the utf8-string from string based on the fonts encoding map. $string = $font->strByUtf $utf8string Returns the encoded string from utf8-string based on the fonts encoding map. $pdfstring = $font->textByStr $text Returns a properly formatted representation of $text for use in the PDF. AUTHOR
Alfred Reibenschuh. perl v5.14.2 2014-03-09 PDF::API2::Resource::BaseFont(3pm)
All times are GMT -4. The time now is 06:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy