Posts by JFontes • 31 points
3 posts
-
1
votes2
answers2044
viewsA: How to get a part of a file name in shell script?
You can do it in some ways, one of them is: ls nome1-nome2-0.0.0.0.war| egrep -wo '[\.0-9]+' The output of this will be: 0.0.0.0 Explanation: I created a file called name1-Nome2-0.0.0.0.War,…
shell-scriptanswered JFontes 31 -
0
votes3
answers2214
viewsA: Crontab Linux run PHP Script at a frequency of less than 1 minute
To run a script every second, you can combine the while function by playing background on the process, for example: while -n1 " /usr/bin/php5 -q /var/www/cloudns.php" & And then the process will…
-
2
votes1
answer309
viewsA: Shell Script - Refresh page every 5 minutes
If you want to call a page every 5 seconds, you can use the curl for this, for example: watch -n5 "curl http://google.com" Perform this on your terminal, and every 5 seconds the page will be called.…