File name swap


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers File name swap
# 1  
Old 04-12-2006
File name swap

I'm trying to write a shell script that accepts two file extensions as command line arguments and renames all files with the first extension within the current working directory to have the second extension instead. The script should print out error messages as is appropriate if there is any problem with the command line arguments. Any help? Smilie
# 2  
Old 04-13-2006
Perhaps I could direct you to: the UNIX Forum Rules
Please take special note of this rule:
Quote:
(6) Do not post classroom or homework problems.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to swap to words in a file?

Hi, I have a file with certain lines in it. i want to swap every occurance of word A with B and every occurrance of word B with A. Example file.txt Unix is a great OS. Linux support graphical user intrface. unix and linux are both same. Output file.txt Linux is a great OS. Unix... (5 Replies)
Discussion started by: Little
5 Replies

2. Solaris

Explain the output of swap -s and swap -l

Hi Solaris Folks :), I need to calculate the swap usage on solaris server, please let me understand the output of below swap -s and swap -l commands. $swap -s total: 1774912k bytes allocated + 240616k reserved = 2015528k used, 14542512k available $swap -l swapfile dev swaplo... (6 Replies)
Discussion started by: seenuvasan1985
6 Replies

3. OS X (Apple)

No eol in swap file

I was editing a file with vi and crashed so when I opened the file again I had the .swp file to deal with. I made the wrong choice trying to recover my file and wound up with a file with no eol (end of line) characters. I have forgotten the code to substitute and don't want to make an even... (2 Replies)
Discussion started by: gale
2 Replies

4. UNIX for Dummies Questions & Answers

deleted a swap file

I attempted to delete a swap file (rm .<filename>.swp). Now the system is trying to delete one file that doesn't exist anymore and the file is adding a number in increments to the name of the file it is attempting to delete (filename1.csv, filename2.csv) The log says the filename1.csv does... (0 Replies)
Discussion started by: student21
0 Replies

5. UNIX for Dummies Questions & Answers

How to swap parts of a file name?

I have a number of files that a structured like this: Eg. file_name.ext1 another file name with spaces.ext2 yatf with .ext3 also a file (plus).ext4 I would like to swap the part with the descriptive_file_name part, so that it looks like this: Eg. file_name .ext1 I know (or... (4 Replies)
Discussion started by: invenio
4 Replies

6. HP-UX

Swap device file and swap sapce

Hi I have an integrity machine rx7620 and rx8640 running hp-ux 11.31. I'm planning to fine tune the system: - I would like to know when does the memory swap space spill over to the device swap space? - And how much % of memory swap utilization should be specified (swap space device... (6 Replies)
Discussion started by: lamoul
6 Replies

7. UNIX for Advanced & Expert Users

Swap file system

This questions only concerns Solaris 10. Let's say I have swap configured like so in /etc/vfstab: /dev/dsk/c1t0d0s1 - - swap - no - /dev/dsk/c1t1d0s1 - - swap - no - /dev/md/dsk/d1 - - swap - no - ... (1 Reply)
Discussion started by: bluescreen
1 Replies

8. Solaris

Swap config - Mirror swap or not?

Hello and thanks in advance. I have a Sun box with raid 1 on the O/S disks using solaris svm. I want to unmirror my swap partition, and add the slice on the second disk as an additional swap device. This would give me twice as much swap space. I have been warned not to do this by some... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

9. UNIX for Advanced & Expert Users

RAID 1 on SWAP file?

Hey everyone, first of all, this is the motherboard I have: GigaByte GA-K8NXP-9 , nForce4 Ultra. It supports RAID 0, 1, 0+1 apparently both on the IDE and S-ATA HDD. Now what I had in mind is popping 2 x 6Gb HDD in the IDE slots as slave 1 & 2 where my 2 DVD/CD burners are master. I then plan... (2 Replies)
Discussion started by: temba
2 Replies

10. UNIX for Dummies Questions & Answers

Swap file

I just started working with AIX and need a little help. Is there a command to find the size of the swap file. (1 Reply)
Discussion started by: paule
1 Replies
Login or Register to Ask a Question