I want to restore an older version (from the SVN revision number 1289) of my current file fic.pl, what can I do ?
Here is the tips (NB my current revision is 1492) :
[npene@donunix] svn merge -r 1492:1289 fic.pl
Welcome to Don Unix
The main purpose of this blog is to show you some interesting Unix and Linux Tips'n Tricks.
I hope you'll enjoy it
I want to restore an older version (from the SVN revision number 1289) of my current file fic.pl, what can I do ?
Here is the tips (NB my current revision is 1492) :
[npene@donunix] svn merge -r 1492:1289 fic.pl
In the following example file « calc.txt », I want to multiply each number by 2/3 :
199,119
326,147
385,345
250,330
157,218
67,241
402,175
Here is the solution in one line with Perl :
[pene@donunix] perl -pi.bak -e 's|(\d+),(\d+)|int($1*2/3).",".int($2*2/3)|e' calc.txt
[pene@donunix] var=`echo $var | tr [a-z] [A-Z]`
[pene@donunix] curl -u twitter_name:twitter_password http://twitter.com/account/rate_limit_status.xml
N.B. : For information, the default rate limit is 100 requests per hour.
How to display all lines with the word text or the word name?
Here is the answer:
[pene@donunix] grep -P 'text|name' file.txt
[pene@donunix] find . -maxdepth 2 -mindepth 2
The purpose of this short post is to explain how being connected to an ssh server without typing the password, how ?
With the generation of public ssh keys.
I. Client : Generation of public keys
First (just for the first time) you have to genere the 2 keys :
[donunix@client] ssh-keygen -t dsa
During the dsa key generation, ssh-keygen ask you to enter a path phrase (it replace the password system). type [enter] if you doesn't what to genere a path phrase.
The 2 keys are in the ~/.ssh directory :
[donunix@client] ls ~/.ssh/id_dsa*
id_dsa id_dsa.pub