Sponsored Content
Full Discussion: rename filename
Top Forums UNIX for Dummies Questions & Answers rename filename Post 302421949 by sakets_2000 on Monday 17th of May 2010 06:35:04 AM
Old 05-17-2010
rename filename

Hi, I am pretty new to this.
I have a condition where in I want to replace all files within a folder. All filenames with character "abc" would need to replaced with "xyz".
eg:
helloabcworld-->helloxyzworld
helloworld-->helloworld
...
...
Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

rename multiple filename.45267.txt to >> filename.txt

i have several thousand files and in subdirs that are named file.46634.txt budget.75346.pdf etc i want to remove the number but retain the extension. it is always a 5 digit. thanks. (6 Replies)
Discussion started by: jason7
6 Replies

2. Shell Programming and Scripting

Grep and rename the filename

Hi All, Can you please help me. The situation is like this. There are many different file name in this directory. I have to grep all the file that the name start with "PTWO" and rename it to COM with the current date. This is the script that I have done and it hit an... (16 Replies)
Discussion started by: badbunny9316
16 Replies

3. Shell Programming and Scripting

how to rename all files that have a certain text in the filename using tcsh shell

Hello~ I'm on AIX version 5 and I believe I have the tcsh shell environment to play in. Can you guys help me with a solution to rename all files that have "eclp" in the filename to "ecl" ? I basically want to rename the files and strip the "p" out. i.e. original filenames: ... (3 Replies)
Discussion started by: in2vtec
3 Replies

4. Shell Programming and Scripting

How do I rename a filename in a directory?

Hi, I've got a large to task to do, which I've broken into three section. I'm just stuck on one of the sections. I have to change the end of a filename from .txt to .doc in a directory. So if I have a directory called "folder1" and two files contained in it called "file1.txt" and "file2.txt",... (7 Replies)
Discussion started by: TeddyP
7 Replies

5. Shell Programming and Scripting

Rename FileName in the Directory

In the Directory all the Files are following format. Filename_yyyymmdd_numbers.txt eg. file_name_20120106_015802.txt . I want to write the Shell script to rename all the file to file_name.txt.in the directory. Thanks Mani (5 Replies)
Discussion started by: gavemani
5 Replies

6. Shell Programming and Scripting

wget same filename from subdirectories and rename or concat

I would like to wget a file "index.html" from a site which is lies in different subdirectories and is different in size. The index.html shall be concatenated or renamed to index01.html index02.html .... I would like to store this file in just one directory and use the option -nd. Though i can't get... (0 Replies)
Discussion started by: sdf
0 Replies

7. Shell Programming and Scripting

Rename all files (filename with spaces) to different extension

Hi, I have files with filenames as below. SGM Daily Sales Email-en-us-05312012.xlwa I want to rename it in .xls. I am writing a script to change this, as there can be multiple files in subfolders. I have the following script. #!/bin/ksh for oldfile in $(find... (1 Reply)
Discussion started by: mac4rfree
1 Replies

8. Shell Programming and Scripting

Filename rename with characters of file

Hi, I need a bit of help. I've used awk to get the first 7 characters of a file - awk '{print substr($0,0,7)}' test.csv How do I now take this variable to rename test.csv to variable.csv ? Any help or advice would be greatly appreciated! (2 Replies)
Discussion started by: sianm
2 Replies

9. Shell Programming and Scripting

Shell script to get one to one map and rename the filename

I have 2 files sorted by numerically. I need help with shell script to read these 2 files and do a 1:1 mapping and rename the filenames with the mapped case#; For example: cat case.txt 10_80 10_90 cat files.txt A BCD_x 1.pdf A BCD_x 2.pdf ls pdf_dir A BCD_x 1.pdf A BCD_x 2.pdf ... (2 Replies)
Discussion started by: iaav
2 Replies

10. Shell Programming and Scripting

Rename first N numeric strings in filename

Hello, I have some video files containing numbers and characters . To tell the problem shortly, due to a limitation, I am unable create a playlist regularly changing on a daily basis with the command shuffle....So I decided to rename filenames, just a replacement of first five numbers randomly.... (10 Replies)
Discussion started by: baris35
10 Replies
c89(1)							      General Commands Manual							    c89(1)

NAME
c89 - Standard C Compiler SYNOPSIS
c89 [-c] [-D name [=value]]... [-E] [-g] [-I directory]... [-L directory]... [-o outfile] [-O] [-s] [-U name]... file... STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: c89: XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
The following options are defined by the XPG4-UNIX standard. However, the compiler can also recognize the options defined in cc(1). Unlike cc(1), c89 includes the -std1 option by default (for ANSI C standards checking). To check for full compliance to XPG4-UNIX, you must also specify -D_XOPEN_SOURCE_EXTENDED. See standards(5) for more information. Suppress the loading phase of the compilation and force an object file to be produced. Produce symbol table information for full symbolic debugging and suppress optimizations that limit full symbolic debugging. Symbol types and stack-frame variables names are available. Global optimizations are not performed. Instruction scheduling does not span source line boundaries. Trap instructions are inserted to ensure that exceptions are reported on the source lines that caused them to be generated. Remove the symbol table and relocation bits to save space (this impairs the usefulness of the debuggers). This informa- tion can also be removed by strip(1). Name the final output file output. If this option is used, the file a.out is undisturbed. Define the name as if with a #define statement. If no definition is given, the name is defined as 1. Run only the C macro preprocessor on the files and send the result to the standard output device. Specifies that #include files whose names do not begin with / are always sought first in the directory of the file argument, then in directories specified in -I options, and finally in the standard directory, /usr/include. Adds dir to the list of directories that are searched for libraries. Directories specified with -L are searched before the standard directories. Enable global optimization, including code motion, strength reduction and test replacement, split lifetime analysis, and code scheduling. Remove any definition of name previously defined with the -D option. DESCRIPTION
Compiles source code in conformance with the XPG4-UNIX standard. The c89 command can process one or more of the following types of "file" arguments: Files whose names end with are assumed to be C source programs. They are compiled, and each object program is left in the file whose name consists of the last component of the source with sub- stituted for file is deleted only when a single source program is compiled and linked in a single step. Files whose names end with are assumed to be libraries of object files. These files are passed directly to the linker. Files whose names end with are assumed to be object files produced by a previous c89 command. These files are also passed directly to the linker. The c89 command can take other types of file arguments, although they are not part of the standard specification. See cc(1) for a descrip- tion of the other file types. When the compiler is invoked, it defines the following C preprocessor macros that identify the language of the input files and the environ- ments in which the code can run: __LANGUAGE_C__ __unix__ __osf__ __alpha _SYSTYPE_BSD LANGUAGE_ASSEMBLY __LANGUAGE_ASSEMBLY__ You can reference these macros in #ifdef statements to isolate code that applies to a particular language or environment. ERRORS
The diagnostics produced by c89 are intended to be self-explanatory. Occasional messages may be produced by the assembler or loader. EXAMPLES
Compiles helloworld.c and produces the executable file helloworld.c c89 -o helloworld helloworld.c Compiles helloworld.c and creates the object file helloworld.o. c89 -c helloworld.c Compiles a.c and b.c, producing a.o and b.o. The object files main.o, a.o, and b.o are then linked together, using the library /a/b/c/libQ.a to resolve any references in a.o, and /a/b/c/libp.a to resolve any references in b.o. The executable program is placed in the file a.out. Only one -L option is needed because libQ.a and libp.a reside in the same directory. c89 -L /a/b/c main.o a.c -l Q b.c -l p ENVIRONMENT VARIABLES
The following environment variables affect compiler operation: Provides a default value for locale variables that are not set. If any of these variables contains an invalid setting, the compiler behaves as if none were set. If set to a non-empty string, this variable over- rides values in all locale variables, including LANG. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte characters instead of multi-byte characters in arguments and input files). Determines the locale used for diagnostic messages. Determines the locale of message catalogs for the processing of LC_MESSAGES. Provides a pathname that overrides the default directory for temporary files, if any. For more information on these environment variables, see i18n_intro(5) and l10n_intro(5). FILES
Input file Object file Loaded output Compiler error messages in English Temporary Compiler configuration file (optional) C front end C macro preprocessor DEC C compiler Binary ucode and symbol table joiner Ucode loader Binary ucode and symbol table splitter Procedure inte- grator Optional global ucode optimizer Post-link optimizer Code generator Symbolic to binary assembly language translator Binary assembly language assembler and reorganizer Run-time startup Startup for profiling Standard library, see intro(3) Level 1 profiling library Standard directory for #include files Interface between prof and cord Procedure rearranger Binary-to-symbolic ucode translator Symbolic-to-binary ucode translator File produced for analysis by prof File produced for analysis by gprof SEE ALSO
Commands: as(1), cc(1), ld(1) Other: i18n_intro(5), l10n_intro(5), standards(5) Guides: ANSI X3.159-1989 B. W. Kernighan and D. M. Ritchie, The C Programming Language B. W. Kernighan, Programming in C -- a tutorial D. M. Ritchie, C Reference Manual Programmer's Guide Assembly Language Programmer's Guide Compaq C Language Reference Manual c89(1)
All times are GMT -4. The time now is 03:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy