10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I made a mistake in a script and now need to go back and change allot of filenames. I need to change "v4" in filenames to "v3". I was thinking of something like this.
#!/bin/bash
FILELIST=$(ls -f -R *)
for FILE in $FILELIST
do
# create new filename
... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
how can i do a case insensitive search/replace but keep the same case?
e.g., i want to change a word like
apple-pie to orange-cake
but for the first word if the first letter of the keyword or the letter after the - is capitalised i want to preserve that
e.g., if the before is:
... (5 Replies)
Discussion started by: vanessafan99
5 Replies
4. Shell Programming and Scripting
I have a filename with a bunch of periods that I want to replace with underscores, but I don't want to change the extension.
Ex: I want
file.test1.f-1.fig.eps
to be
file_test1_f-1_fig.eps
Using awk, the following line will replace ALL periods with underscores, but I want to leave the... (2 Replies)
Discussion started by: erinbot
2 Replies
5. Shell Programming and Scripting
Hi, all:
I'd love to use shell script to change all filenames under different folders once for all:
I've got over 100 folders, in each of them, there is a file named "a.ppm". I wanna change all these "a.ppm" to "b.ppm", and still . Visually, the directory structure looks like:
and hope... (1 Reply)
Discussion started by: jiapei100
1 Replies
6. Shell Programming and Scripting
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. UNIX for Dummies Questions & Answers
Hi I have abc_ahb_one.v
abc_ahb_two.v
abc_ahb_three.v
........l
like this
-----upto
abc_ahb_ninety.v in some directory.
I need to change those file names to like below.
... (5 Replies)
Discussion started by: praneethk
5 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
I have a directory of files and each file has a random 5 digit string at the beginning that needs to be removed. Plus, there are some files that will be identically named after the 5 digit string is removed and I want those eliminated or moved.
any ideas? (17 Replies)
Discussion started by: crumb
17 Replies
10. UNIX for Dummies Questions & Answers
Hi,
Currently my website is hosted on Linux-Apache environment. If I try to access a file on a website named "Read.txt" as http://xyz.com/READ.txt, I get an error message "Page Not Found". Only way to access is http://xyz.com/Read.txt. How do I make URLS (File Names and Folder Names)... (1 Reply)
Discussion started by: naidu545
1 Replies