Hello guys I have installed a cvs and Samba on a system running SuSE 8.0. Under my CVS path i have a module name which i want to tranfer (for backup reasons) every day on a different PC. The problem is that the files on the cvs are like filename.php.v and this is a problem because i want to transfer all of them on the 2nd pc in a specific location (on the apache root folder) where apache is running and ofcourse it can recognize .php.v extensions. Any suggestions on how i can rename on the fly all this files before copying all this to the 2nd PC ? Thanks
On Tue, 24 Jun 2003, Stelios wrote:
I have installed a cvs and Samba on a system running SuSE 8.0. Under my CVS path i have a module name which i want to tranfer (for backup reasons) every day on a different PC. The problem is that the files on the cvs are like filename.php.v and this is a problem because i want to transfer all of them on the 2nd pc in a specific location (on the apache root folder) where apache is running and ofcourse it can recognize .php.v extensions. Any suggestions on how i can rename on the fly all this files before copying all this to the 2nd PC ?
The files in your CVS repository are in filename.php,v and not php.v format, so may be there is no problem of the kind that you are anticipating. You might still want to throw in a tar cvfz modulename.gz module-dir and then FTP this archive to the second PC rather than the directory. Rohit ********************************************************* Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. ********************************************************* Visit us at http://www.mahindrabt.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 24 June 2003 02:17, Stelios wrote:
Hello guys
I have installed a cvs and Samba on a system running SuSE 8.0. Under my CVS path i have a module name which i want to tranfer (for backup reasons) every day on a different PC. The problem is that the files on the cvs are like filename.php.v and this is a problem because i want to transfer all of them on the 2nd pc in a specific location (on the apache root folder) where apache is running and ofcourse it can recognize .php.v extensions. Any suggestions on how i can rename on the fly all this files before copying all this to the 2nd PC ?
Thanks
There is a shell utility that I found in the "Unix Power Tools v2.0" by O'Reilly that can rename multiple files in one command structure. This should be easier for you to use than trying to construct a naming convention script. The scripting may be a bit complex for your use ----- unless you just like to learn how these things work. Just call upon the utility using cron. Syntax is: thomas@suse:~> ren *.php,v *.php thomas@suse:~> I am pretty sure that you can also set the output dir. You can dl it at: http://www.ibiblio.org/pub/Linux/utils/file/ren-1.0.tar.gz HTH. - -- Thomas Jones Linux-Howtos Network Administrator OpenGPG Key: 0x6A3DF6E9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE++MmoQT2komo99ukRAnbdAJ9KFR6eXzcISewS6WI7fweALqzEMACgsXai f2wqGhm3UPVUnwc1j1QtYXQ= =MR4T -----END PGP SIGNATURE-----
On Tue, 2003-06-24 at 23:59, Thomas Jones wrote:
thomas@suse:~> ren *.php,v *.php
That's wrong, very wrong. First of all, the shell will expand those * unless you escape them, secondly, the replacement pattern should contain #n, where n is the number, in order, of the matched pattern. In other words, the syntax is identical to the mmv utility which is included in SuSE \*.php.v \#1.php
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 24 June 2003 17:04, Anders Johansson wrote:
On Tue, 2003-06-24 at 23:59, Thomas Jones wrote:
thomas@suse:~> ren *.php,v *.php
That's wrong, very wrong. First of all, the shell will expand those * unless you escape them, secondly, the replacement pattern should contain #n, where n is the number, in order, of the matched pattern. In other words, the syntax is identical to the mmv utility which is included in SuSE
\*.php.v \#1.php
Well.........ok you are partially correct... You are right about the hash mark.Unless you are using the C shell interactively-------which doesn't recognize the # as a comment. It does feed from the wildcard in this sequence under bash. Isn't the standard escape sequence for a string the single quotes in bash and/or bourne? Unless of course the command sequence contains $ or \ or `???? Which then calls for the doublequote. By the way, that command you gave won't work. That's a "," not a "." before the v. Tag you are it!!!!!! - -- Thomas Jones Linux-Howtos Network Administrator OpenGPG Key: 0x6A3DF6E9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE++QN0QT2komo99ukRAkPSAKCjgSqc3GhminfqeGnNfeod4VPezwCdHtiv d2aO8u0GE7OduYYeaabXLtY= =lwEP -----END PGP SIGNATURE-----
On Wed, 2003-06-25 at 04:05, Thomas Jones wrote:
Well.........ok you are partially correct...
Partially?
You are right about the hash mark.Unless you are using the C shell interactively-------which doesn't recognize the # as a comment.
I have no idea what you're trying to say here
It does feed from the wildcard in this sequence under bash.
indeed
Isn't the standard escape sequence for a string the single quotes in bash and/or bourne?
Perhaps. The point is that you gave a completely messed up syntax, and then tried to pretend that you'd tested it by faking a copy-paste from a shell prompt, when in fact if you run the command as you gave it, you get a usage printout.
By the way, that command you gave won't work. That's a "," not a "." before the v.
Tag you are it!!!!!!
And you are how old?
- -- Thomas Jones Linux-Howtos Network Administrator
and what does that mean, exactly?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 24 June 2003 21:16, Anders Johansson wrote:
On Wed, 2003-06-25 at 04:05, Thomas Jones wrote:
Well.........ok you are partially correct...
Partially?
You are right about the hash mark.Unless you are using the C shell interactively-------which doesn't recognize the # as a comment.
I have no idea what you're trying to say here
The point is that the hash mark is not expanded with any special meaning under the C shell. This simply states that the # mark does not act the same under C as it does ----- say bourne or bash. This may be a valid consideration for someone given they have not stated theor preferred shell.
It does feed from the wildcard in this sequence under bash.
indeed
Isn't the standard escape sequence for a string the single quotes in bash and/or bourne?
Perhaps. The point is that you gave a completely messed up syntax, and then tried to pretend that you'd tested it by faking a copy-paste from a shell prompt, when in fact if you run the command as you gave it, you get a usage printout.
I just typed in the prompt by hand. This simply gives a visual representation of the shell interface.....it's not needed...by no means. But, it does however help a person new to linux to understand the procedures and/or functions needed to perform various commands. Some would call it an illustrated example. I never said I tested it. And if it had given a usage printout....i believe(in my opinion) that the person performing the command would be all the better to understand the functionality of the binary if they had to figure it out themeselves? It is well-known that the best direction to help a person learn is to provide a direction...not do it for them. To me learning the intricacies of linux is far more exciting, upon the trials and tribulations found and discovered by myself rather than having soemone just tell me. But, that's just me.
By the way, that command you gave won't work. That's a "," not a "." before the v.
Tag you are it!!!!!!
And you are how old?
27...It's just a figure of speech meaning that it is now your turn to reply. Too often people on this list are to quick to correct others. It would be more efficient to the community, to give direction not correct every one that shows the desire to help. Specifically, if your correction is incorrect as well.
- -- Thomas Jones Linux-Howtos Network Administrator
and what does that mean, exactly?
Ummmm....network admin for the linux-howtos.com domain. You seem to be a bit uptight. Don't get frustrated...i gave an incorrect answer. As did you. We all are still learning. No reason to get defensive or upset about it. I learned that i should check my command sequences prior to posting them on this list. No more typing from memory and expecting it to work the first time. Hopefully, you have learned something from it also. All in the pursuit of knowledge. - -- Thomas Jones Linux-Howtos Network Administrator OpenGPG Key: 0x6A3DF6E9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE++RNTQT2komo99ukRAhayAJ0V9uUyYif729aKL3FuogriYcdyRQCfTM9/ bOMPcwKXSXTtbhgF7ZYf5pc= =4/Kt -----END PGP SIGNATURE-----
participants (4)
-
Anders Johansson
-
Rohit
-
Stelios
-
Thomas Jones