Sponsored Content
Homework and Emergencies Homework & Coursework Questions Create file and then change the extension case. Post 302362765 by Scrutinizer on Saturday 17th of October 2009 12:10:19 PM
Old 10-17-2009
Hi Kdenmen,

What happens if you temporarily put extra echo statements after some of the variable assignments, especially those that contain pattern matching operators? Do you get the desired result? Also where does the function "Createfile" end and where does it get to be called? Why do you need the find command if you just need to rename a single file?

S.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with multiple file rename - change case of part of file name

Hi there, I hope someone can help me with this problem : I have a directory (/var/www/file/imgprofil) which contains about 10000 JPG files. They have a naming convention thus : prefix-date-key-suffix.jpg they all have the prefix p-20050608- then AAAA is a 4 letter code the suffix is... (7 Replies)
Discussion started by: steve7
7 Replies

2. Shell Programming and Scripting

change file extension from root and subdirectories

Hello, my first post! I'd appreciate help with this script, I'm new to this. I have a media directory where I want to batch convert image file names from .img to .iso. I've tried but get: $ ./img2iso2.sh ./img2iso2.sh: line 13: syntax error: unexpected end of file :( This is my... (10 Replies)
Discussion started by: Astrid
10 Replies

3. Shell Programming and Scripting

How to match the last XML extension by using Case statement

Hi All, I have a status.txt file which contains following three files. 1.xml 2.xml 3.xml Now i have written a shell script 1.sh which contains the following cat status.txt | while read filename do echo $filename case "$filename" in xml) echo "running 1.xml" ;; ... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies

4. UNIX for Dummies Questions & Answers

Shell script to rename or change file extension case.

I searched the forum, but there was different type of rename. Hello. I have files in folder. Like: xxxxxxxx1.html or xxxxxxxx2.txt or xxxxxxxx3.tar.gz and how to rename or change file extension case to xxxxxxxx1.htm or xxxxxxx2.TXT or (5 Replies)
Discussion started by: Sheldon
5 Replies

5. Shell Programming and Scripting

data array needs to change upper case to lower case

Hi all, i have a data array as followes. ARRAY=DFSG345GGG ARRAY=234FDFG090 ARRAY=VDFVGBGHH so on.......... i need all english letters to be change to lower case. So i am expecting to see ARRAY=dfsg345ggg ARRAY=234fdfg090 ARRAY=vdfvgbghh so on........ If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies

6. Shell Programming and Scripting

[Solved] Change Upper case to Lower case in C shell

Is there a command that can switch a character variable from UPPER case to lower case? like foreach AC ( ABC BCD PLL QIO) set ac `COMMAND($AC)` ... end Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies

7. Shell Programming and Scripting

shell script to change the extension of a file

I have a directory that contains several files, out of which some files are have an extra extension for example file1.new.new.new file2.new.new.new file3.new.new.new file4.new.new.new i want to write a shell script that rename all such file with only single extension like file1.new... (7 Replies)
Discussion started by: mukulverma2408
7 Replies

8. Shell Programming and Scripting

Change first letter of a word from lower case to upper case

Hi all, I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like . ; : ! ?I found the following command sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies

9. Shell Programming and Scripting

Change file extension

Hi Guys, i am trying to redirect a file wherein i need to change the extension of the file from .sh to .tmp, but getting an error a=test.txt sh test.txt > path/$(basename "$a" .sh).tmp i need test.tmp ---------- Post updated at 02:09 AM ---------- Previous update was at... (3 Replies)
Discussion started by: rohit_shinez
3 Replies

10. Shell Programming and Scripting

Bash to create sub directories from specific file extension

In the bash below I am trying to create sub-directories inside a directory from files with specific .bam extensions. There may be more then one $RDIR ing the directory and the .bam file(s) are trimmed (removing the extension and IonCode_0000_) and the result is the folder name that is saved in... (2 Replies)
Discussion started by: cmccabe
2 Replies
vc(1)							      General Commands Manual							     vc(1)

NAME
vc - substitutes assigned values in place of identification keywords. SYNOPSIS
char] [keyword=value ... keyword=value] DESCRIPTION
The or version control command copies lines from the standard input to the standard output under control of command line arguments and con- trol statements encountered in the standard input. In the process of performing the copy operation, user declared keywords can be replaced by their string value when they appear in plain text and/or control statements. The copying of lines from the standard input to the stan- dard output is conditional, based on tests of keyword values specified in control statements or on command arguments. Replacement of keywords by values is done whenever a keyword surrounded by control characters is encountered on a version control state- ment. The option forces replacement of keywords in all lines of text. An uninterpreted control character can be included in a value by preceding it with If a literal is desired, it too must be preceded by The command is part of the SCCS (Source Code Control System) command suite. Options recognizes the following options and arguments: Replace keywords surrounded by control characters with their assigned value in all text lines and not just in statements. Ignore all characters from the beginning of a line up to and including the first tab character for the purpose of detecting a control statement. If one is found, all char- acters up to and including the tab are discarded. Specify a control character to be used in place of Silence warning messages (not errors) that are normally printed on the diagnostic output. Control Statements A control statement is a single line beginning with a control character, and the default control character is colon (Unless the and options are used [See above]). Input lines beginning with a backslash followed by the control character are not control lines, and are copied to the standard output with the backslash removed. Lines beginning with a backslash followed by a non-control character are copied in their entirety. A keyword is composed of 9 or fewer alphanumeric characters of which the first character is alphabetic. A value is any ASCII string that can be created using (see ed(1)); a numeric value is an unsigned string of digits. Keyword values must not contain spaces or tabs. Version control statements occur in the following forms: :dcl keyword[, ..., keyword] Used to declare keywords. All keywords must be declared. :asg keyword=value Used to assign values to keywords. An statement overrides the assignment for the corresponding keyword on the command line and all previous for that keyword. Keywords declared, but not assigned values have null values. Used to skip lines of the standard input. If the condition is true, all lines between the if statement and the matching end statement are copied to the standard output. If the condition is false, all intervening lines are discarded, including control statements. Note that intervening if statements and matching end statements are recognized solely for the purpose of maintain- ing the proper if-end matching. The syntax of a condition may include the following: <cond> ::= [ "not" ] <or> <or> ::= <and> | <and> "|" <or> <and> ::= <exp> | <exp> "&" <and> <exp> ::= "(" <or> ")" | <value> <op> <value> <op> ::= "=" | "!=" | "<" | ">" <value> ::= <arbitrary ASCII string> | <numeric string> The following are available operators and their meanings: equal not equal and or greater than less than used for logical groupings allowed only immediately after the if, and when present, inverts the value of the entire condition The and operate only on unsigned integer values (such as is false). All other operators take strings as arguments (for example, is true). The precedence of the operators (from highest to lowest) is as follows: all of equal precedence Parentheses can be used to alter the order of precedence. Values must be separated from operators or parentheses by at least one space or tab. Used for keyword replacement on lines that are copied to the standard output. The two leading control characters are removed, and keywords surrounded by control characters in text are replaced by their value before the line is copied to the output file. This action is independent of the option. Turn on or off keyword replacement on all lines. Change the control character to char. Prints the given message on the diagnostic output. Prints the given message followed by: on the diagnostic output. halts execution and returns an exit code of 1. EXTERNAL INFLUENCES
Environment Variables determines the interpretation of keywords, values, the control character assigned through and within text as single- and/or multi-byte characters. determines the language in which messages are displayed. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). RETURN VALUE
returns 0 on normal completion; 1 if an error occurs. DIAGNOSTICS
Use sccshelp(1) for explanations. SEE ALSO
ed(1), sccshelp(1). vc(1)
All times are GMT -4. The time now is 01:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy