Perl: Changing the name of files [closed] - perl

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Everyday the following files appear in my computer (one per day, inside /my/dir/):
stackoverflow.20130712_0.log
stackoverflow.20130713_0.log
I want to change their name to stackoverflow.20130712 and stackoverflow.20130713, that is, erase the "_0.log" part everyday with a cron job.
A module or script you would recommend me?
I'm on CentOS

You can get the rename script from CPAN:
http://search.cpan.org/perldoc?rename
Then you can do:
rename 's/_0.log$//' stackoverflow*_0.log

No dependencies solution,
perl -e 'for (#ARGV){ $t=$_; s|_0[.]log$||; rename($t,$_) }' stackoverflow.*

Related

What is the difference between sqldeveloper.exe and sqldeveloperW.exe? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
My antivirus blocking sqldeveloperw.exe and allowing sqldeveper.exe. I want to know the difference between these.
One prints debug info to the console when you run it (sqldeveloperw.exe) and one doesn't (sqldeveloper.exe)
You should always run the sqldeveloper.exe in the base directory unless instructed otherwise by support/R&D to run something out of the bin directory for debugging purposes.

How can i make my custom command available to all user in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I have written a custom command under user 'krishna' on my laptop, and now i want it to be available for other all user without redefining to each user. For now, i have defined the command in /home/krishna/.bashrc As this file exist under user krishna and work only for krishna. is there any way i can defile it globally for all users?
You can define the command in the /etc/bashrc or /etc/bash.bashrc file (which one depends on your distribution). One of these should exist on your machine.
Commands you define in your local /home/[USER]/.bashrc are only available for [USER].
Commands or aliase defined in /etc/bashrc are available for all useres

Permanently storing zsh aliases [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I created a new alias by typing:
~ alias gpo='git push origin'
I see my newly created alias when I type alias (which lists all the available aliases) but when I close my terminal and reopen it, they vanish.
How do I ensure that it is permanently available?
How do I keep a backup of all my aliases so I can carry them with me even if I move between computers?
You can keep it inside ~/.zshrc

Where does windows commandline ftp download to? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am running ftp in windows command line and the operating system in windows 7.
Where do files get downloaded to locally when i do a get operation?
The command line ftp client uses the current working directory (which can be changed with the lcd command)

how to run matlab script in mac terminal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I search for this and got some answer involving sudo, I am a beginner to linux and curious how to do it in terminal,
say my file is in Desktop/hw
matlab is installed in application
could give me a detailed commands instructions?
Thanks
I just check that on my MacOS machine. Depending on where you installed your MATLAB, but
/Applications/MATLAB_R2013b.app/Contents/MacOS/MATLAB_maci64 -nodisplay
worked for my case.