![]() |
|
#1
|
|||
|
|||
Shell scriptingHI,
im new to shell scripting. I jst want to write a script to rename the filenames, in a given folder. I seaced for a way, and found 'sed' command. nw i want to pass the folder name to the script. I dnt hv any idea about,passing values to script. Can anyone help me. Thnak u. |
|||
|
#2
|
|||
|
|||
Re: C shell scriptingQuote:
Here you can find Bash Programming - Introduction and Advanced Bash-Scripting Guide Using a couple of things gleaned from the HOWTO, here is a bash shell that runs on my Linux systems: Code:
A couple of runs, from a Bash shell: Code:
Code:
Regards, Dave Footnotes: 1. If you are using some other shell (tcsh, ksh, sh (the original UNIX Bourne shell), or whatever), then you can search for tutorials on that one. When asking a question that is not about standard C or C++, you should always give full information (what Operating System, for example). 2. If you read through the HOWTO, you can even find an example of a File re-namer script 3. This doesn't really belong in a C programming forum since it has nothing to do with the C language. If you are using Linux, maybe it should be posted on the "Computer Software Forum - Linux" part of gidforums. If something else, then, maybe on the "Miscellaneous Programming" part. (I assume that you are not using the Microsoft cmd.exe shell, but if you are, then you can post on the "Computer Software Forum - Windows" part.) Last edited by davekw7x : 10-Dec-2008 at 08:43.
|
|
#3
|
|||
|
|||
Re: C shell scriptingHI ,
thank u so much. Actually it was a mistak that i used c forum. Normally,i used this site for C problems,an accidently i had used this time also. btw,Im using LINUX environment and tryn to get basic knowledge about shell scripting. Btw,thank uso much 4 ur guidence. Regards, Nilusha. |
|
#4
|
|||
|
|||
Re: Shell scriptingHi,
I want to pass a folder name to the script,and want to get the content files one by one. How should I expand the folder contents and look for a files? Can anyone help me plz. |
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help supporting linux pipes in a C shell program | student28 | C Programming Language | 4 | 28-Nov-2007 09:28 |
| Shell program | ajohn | Computer Software Forum - Linux | 13 | 16-Oct-2007 10:31 |
| scripting language | sai krishna | Web Design Forum | 4 | 23-Dec-2006 12:53 |
| problem with system() and win32 shell | lordfuoco | C++ Forum | 0 | 27-Jun-2006 03:09 |
| Call a C program through Linux shell script | nuwandee | C Programming Language | 3 | 29-Mar-2004 21:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The