Sponsored Content
Top Forums Shell Programming and Scripting Batch changing file extensions Post 302190416 by danmero on Tuesday 29th of April 2008 03:38:08 PM
Old 04-29-2008
era: you got me, my badSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File name extensions

Hello people, I was wondering if anyone could help me? I want to produce a shell script that changes the filename extension on all matching file. E.G. change all files called ‘something.rtf' to ‘something.doc' by giving the command: Changex rtf doc *where ‘Changex' is the name of... (2 Replies)
Discussion started by: thurrock
2 Replies

2. Shell Programming and Scripting

Truncate multiple file extensions

Hi, I have files with names like file1.txt.txt.txt.txt and file2.txt.txt.txt.txt.txt............ (random infinite number of .txt exist). how to truncate (mv) their names to ones with single .txt extension like file1.txt and file1.txt ? In other words, how to extract the filename upto first... (12 Replies)
Discussion started by: prvnrk
12 Replies

3. UNIX for Dummies Questions & Answers

Batch Renaming: Change files' extensions in many sub-directories

Hi all - I'm trying to rename a large number of files all at once and need some help figuring out the command line syntax to do it. I've already done quite a bit of research with the rename and mv commands, but so far haven't found a solution that seems to work for me. So: The files exist... (10 Replies)
Discussion started by: dave920
10 Replies

4. UNIX for Dummies Questions & Answers

changing extensions for multiple files at once

I copied some files to another folder, and I want to change them from .doc extensions to .txt extensions. I tried using the cp and mv commands, but it didn't work. Is it possible to change file extensions with these commands, and if so how do I do it? I tried using the * wildcard (say cp *.doc... (1 Reply)
Discussion started by: Straitsfan
1 Replies

5. Shell Programming and Scripting

File extensions in a dir

Hi All, Is there a way to list all file extensions in a directory and its recursive dirs? Thanks (5 Replies)
Discussion started by: ganga.dharan
5 Replies

6. UNIX for Dummies Questions & Answers

Find all the unique file extensions

Hi How can i find the unique list of file extensions in a folder/subfolders e.g. MAIN/ a.txt b.txt a.clas a.java b.class a.txt.112 c.12.ram.jar i just need to get the below out irrespective of file being present in folder or subfolders txt clas java (5 Replies)
Discussion started by: reldb
5 Replies

7. Shell Programming and Scripting

Checking file extensions

I am trying to store file with certain file extensions to list but having some problems. Here is a part of the code set fryLst = "" set fxtLst = "" foreach f ($AfullNameLst) set fname = $f:r set fext = $f:e if ("$fext" == ".ry") set fryLst = "$fryLst $f" if ("$fext" == ".xt")... (2 Replies)
Discussion started by: kristinu
2 Replies

8. Shell Programming and Scripting

Checking file extensions

I'm in csh and have a list of file names, example set Lst = "file1.ry file2.ry file3.ry file4.ry" I want to check if all the extensions are ry. Is they are, I want to do something. (1 Reply)
Discussion started by: kristinu
1 Replies

9. Shell Programming and Scripting

rename file, add extensions

Hi Guys, I have files named myfileaa,myfileab,myfileac,myfilesad.... till myfileav. Now i needs to rename all these files to myfileaa.txt ,myfileab.txt,myfileac.txt. Please help me how to do the same. Thanks in advance..!!! (4 Replies)
Discussion started by: jaituteja
4 Replies

10. Shell Programming and Scripting

Remove comments from file with specific file name extensions

Hello Unix board community, I have to program a shell script, but I am a complete noob so I hope I get some help here. The assignment is as follows: The program removes all comments regardless of formatting or language from files with specific file name extensions (php, css, js, ...).... (3 Replies)
Discussion started by: TheZeusMan
3 Replies
NL_LANGINFO(3)								 1							    NL_LANGINFO(3)

nl_langinfo - Query language and locale information

SYNOPSIS
string nl_langinfo (int $item) DESCRIPTION
nl_langinfo(3) is used to access individual elements of the locale categories. Unlike localeconv(3), which returns all of the elements, nl_langinfo(3) allows you to select any specific element. PARAMETERS
o $item -$item may be an integer value of the element or the constant name of the element. The following is a list of constant names for $item that may be used and their description. Some of these constants may not be defined or hold no value for certain locales. nl_langinfo Constants +-------------------------------+---------------------------------------------------+ | Constant | | | | | | | Description | | | | +-------------------------------+---------------------------------------------------+ | | | | LC_TIME Category Constants | | | | | | | | | ABDAY_(1-7) | | | | | | | Abbreviated name of n-th day of the week. | | | | | | | | DAY_(1-7) | | | | | | | Name of the n-th day of the week (DAY_1 = Sun- | | | day). | | | | | | | | ABMON_(1-12) | | | | | | | Abbreviated name of the n-th month of the year. | | | | | | | | MON_(1-12) | | | | | | | Name of the n-th month of the year. | | | | | | | | AM_STR | | | | | | | String for Ante meridian. | | | | | | | | PM_STR | | | | | | | String for Post meridian. | | | | | | | | D_T_FMT | | | | | | | String that can be used as the format string for | | | strftime(3) to represent time and date. | | | | | | | | D_FMT | | | | | | | String that can be used as the format string for | | | strftime(3) to represent date. | | | | | | | | T_FMT | | | | | | | String that can be used as the format string for | | | strftime(3) to represent time. | | | | | | | | T_FMT_AMPM | | | | | | | String that can be used as the format string for | | | strftime(3) to represent time in 12-hour format | | | with ante/post meridian. | | | | | | | | ERA | | | | | | | Alternate era. | | | | | | | | ERA_YEAR | | | | | | | Year in alternate era format. | | | | | | | | ERA_D_T_FMT | | | | | | | Date and time in alternate era format (string can | | | be used in strftime(3)). | | | | | | | | ERA_D_FMT | | | | | | | Date in alternate era format (string can be used | | | in strftime(3)). | | | | | | | | ERA_T_FMT | | | | | | | Time in alternate era format (string can be used | | | in strftime(3)). | | | | | | | |LC_MONETARY Category Constants | | | | | | | | | INT_CURR_SYMBOL | | | | | | | International currency symbol. | | | | | | | | CURRENCY_SYMBOL | | | | | | | Local currency symbol. | | | | | | | | CRNCYSTR | | | | | | | Same value as CURRENCY_SYMBOL. | | | | | | | | MON_DECIMAL_POINT | | | | | | | Decimal point character. | | | | | | | | MON_THOUSANDS_SEP | | | | | | | Thousands separator (groups of three digits). | | | | | | | | MON_GROUPING | | | | | | | Like "grouping" element. | | | | | | | | POSITIVE_SIGN | | | | | | | Sign for positive values. | | | | | | | | NEGATIVE_SIGN | | | | | | | Sign for negative values. | | | | | | | | INT_FRAC_DIGITS | | | | | | | International fractional digits. | | | | | | | | FRAC_DIGITS | | | | | | | Local fractional digits. | | | | | | | | P_CS_PRECEDES | | | | | | | Returns 1 if CURRENCY_SYMBOL precedes a positive | | | value. | | | | | | | | P_SEP_BY_SPACE | | | | | | | Returns 1 if a space separates CURRENCY_SYMBOL | | | from a positive value. | | | | | | | | N_CS_PRECEDES | | | | | | | Returns 1 if CURRENCY_SYMBOL precedes a negative | | | value. | | | | | | | | N_SEP_BY_SPACE | | | | | | | Returns 1 if a space separates CURRENCY_SYMBOL | | | from a negative value. | | | | | | | | P_SIGN_POSN | | | | | | | | | | | | | o Returns 0 if parentheses | | | surround the quantity and | | | CURRENCY_SYMBOL. | | | | | | o Returns 1 if the sign | | | string precedes the quantity | | | and | | | CURRENCY_SYMBOL. | | | | | | o Returns 2 if the sign | | | string follows the quantity | | | and | | | CURRENCY_SYMBOL. | | | | | | o Returns 3 if the sign | | | string immediately precedes | | | the | | | CURRENCY_SYMBOL. | | | | | | o Returns 4 if the sign | | | string immediately follows | | | the | | | CURRENCY_SYMBOL. | | | | | | | | N_SIGN_POSN | | | | | | | | |LC_NUMERIC Category Constants | | | | | | | | | DECIMAL_POINT | | | | | | | Decimal point character. | | | | | | | | RADIXCHAR | | | | | | | Same value as DECIMAL_POINT. | | | | | | | | THOUSANDS_SEP | | | | | | | Separator character for thousands (groups of | | | three digits). | | | | | | | | THOUSEP | | | | | | | Same value as THOUSANDS_SEP. | | | | | | | | GROUPING | | | | | | | | | | T{ | | | | | | LC_MESSAGES Category Constants | | | | | | | | YESEXPR | | | | | | | Regex string for matching "yes" input. | | | | | | | | NOEXPR | | | | | | | Regex string for matching "no" input. | | | | | | | | YESSTR | | | | | | | Output string for "yes". | | | | | | | | NOSTR | | | | | | | Output string for "no". | | | | | | | | LC_CTYPE Category Constants | | | | | | | | | CODESET | | | | | | | Return a string with the name of the character | | | encoding. | | | | +-------------------------------+---------------------------------------------------+ RETURN VALUES
Returns the element as a string, or FALSE if $item is not valid. NOTES
Note This function is not implemented on Windows platforms. SEE ALSO
setlocale(3), localeconv(3). PHP Documentation Group NL_LANGINFO(3)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy