Sponsored Content
Top Forums Shell Programming and Scripting Batch changing file extensions Post 302190413 by era on Tuesday 29th of April 2008 03:16:51 PM
Old 04-29-2008
danmero: *bling*, Useless Use of ls in Backticks.

Code:
for file in *\;*
do
  mv "$file" "${file%;*}"
done

cdines: The best-case scenario, as you note, would be to find a ftp client which understands the VMS file naming convention and can convert it to Unix, but I have never heard of one which would do that. Ask in VMS circles, though; they would know.
 

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
FAL(8)							      System Manager's Manual							    FAL(8)

NAME
fal - File Access Listener for DECnet SYNOPSIS
fal [options] Options: [-dvVhmt] [-l logtype] [-a auto-type] [-f <auto-file>] [-r <virtual-root>] DESCRIPTION
fal is a daemon that serves incoming DAP (Data Access protocol) connections from remote systems. It enables transparent file access to files from OpenVMS machines using standard DECnet syntax. It should be started at system boot time (after DECnet has been started) and must be run as root. The file names output by fal will adapt depending on the sytax of files that are requested of it. If VMS-style filenames are requested then VMS-style filenames will be returned. If Unix-style filenames are requested then Unix-style (native) filenames will be returned. Note that to force fal to display the contents of a directory with Unix-style names the name must end in a slash or have some form of wildcard char- acter in it. When returning VMS-style filenames, all names will be converted to upper case, directories will have .DIR appended to them and all file- names will have a version number of 1. In addition fal will construct a volume and directory syntax for the directory that will look familiar to VMS users. Of course it also understands this syntax when files and directories are requested of it. One of the problems with this is that Unix filenames with non-VMS syntax (eg double dots or "funny" characters) or files with uppercase letter in their names will not be accessible from VMS using VMS syntax. You must use Unix syntax to access these files through FAL. The options below affect the behaviour of fal. If you are using dnetd then these options should be specified in the dnetd.conf(5) file. By default all files sent by fal will be sent in STREAMLF format. This is configurable by the many command-line switches detailed below. OPTIONS
-l Set logging options. The following are available: -lm Log to /dev/mono. (only useful if you have my mono monitor driver or mdacon and a second monitor) -le Log to stderr. Use this for debugging or testing combined with -d. -ls Log to syslog(3). This is the default if no options are given. -a Set algorithm for automatically selecting file types. -ag Guess file type based on first few bytes -ae Check file extension against a table By default all files will be sent/received as STREAMLF -f <filename> Specify the filename used to check file extensions. Only valid with -ae. The format if the file is simple: extension <b/r> <block size>. In fact, 'r' is more of a comment than an instruction but it may be used in future to support proper variable-length record files. By default an internal table is used with some common file extensions. It is as follows: #Generic types .txt r .c r .cc r .log r .html r # VMS types .com r .lis r .bck b 32256 .save b 8192 .exe b 512 .zip b 512 #Linux types .tar b 10240 .gz b 512 .tgz b 512 .bz2 b 512 # End of file -u Enable users to override the two above options with a .fal_auto file in her/his home directory. This file should contain a single word: guess, ext or none. Note that -u and a .fal_auto file takes effect even if no -a option is present. -m Use the meta-file directory (normally named .fal) to store file attributes. Metafiles will override any guessed or checked file attributes. -t Instruct FAL for look for .$ADF$ files created by the NFS Client in TCP/IP for VMS V5.0+ and use them to get file attributes. This option can be used with the -m and -a flags in which case a .$ADF$ takes precedence over a fal metafile or a guessed file type. -r <virtual root> Run FAL in a "virtual root". All file accesses will be done below this directory rather than the normal root filesystem. ie access for "/" or "SYSDISK:[000000]" will start at the specified directory. Requests for ".." will be refused. NOTE: This is not a chroot, fal still runs in the normal filesystem. also note that this will lose the ability to access users home directories: all users doing a "DIR LINUX::*.*" from VMS will see the virtual root instead. -d Don't fork and run the background. Use this for debugging. -v Verbose. The more of these there are the more verbose fal will be. Don't use more than one for normal operation because it will seriously impair performance. -h -? Displays help for using the command. -V Show the version of fal. SEE ALSO
decnet.proxy(5), dnetd(8), dnetd.conf(5), dntype(1), dndir(1), dndel(1), dntask(1), dnsubmit(1), dnprint(1) DECnet utilities May 6 1999 FAL(8)
All times are GMT -4. The time now is 08:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy