Vydání 13.04, 12.10, 12.04 > Programování pro GNU/Linux
Užitečné skripty
Martin - ViPEr*CZ*:
:D :D tak o tom to přesně je :D
nettezzaumana:
ukazu Vam par svych skriptiku, ktere denne pouzivam ::
--- Kód: (google_search.sh) ---#!/bin/bash
# let's find quickly what should be found
# from cmdline ..
# feel free to edit it ;)
# regards by ntz
if [ -z "$1" ]; then
echo "nothing to search?"
exit 1
fi
SEARCH_TARGET=$(echo $@ | sed 's/\ /+/g')
firefox -new-tab "google.com/search?&q=$SEARCH_TARGET" &
exit 0
--- Konec kódu ---
****
--- Kód: (man_html.sh) ---#!/bin/bash
# opens suggested manpage as new tab in firefox..
#-------------------------------------------------
man $1 --html="firefox -new-tab" &>/dev/null &
exit 0;
--- Konec kódu ---
****
--- Kód: (calc.pl) ---#!/usr/bin/perl -w
#
# should hopefuly calculate given expression..
# in some cases need to enclose input string between double-quotes
#--------------------------------------------------------------
# print eval("@ARGV")."\n"; // ::one line solution..
# note, that using 'eval' function is not so safe, because
# 'eval' function evaluates given parameter as a expression..
# so e.g. parameter "system('ls -la')" returns output of same
# command, like given to shell ..
# regards by ntz
use strict;
sub CALCUL_IT {
my $PAYBACK = eval("@_");
print "$PAYBACK\n";
}
&CALCUL_IT(@ARGV);
exit 0;
--- Konec kódu ---
honorguard:
Moc pěkný, sice nevim na co je ten třetí, ale jinak ty první dva jsou hustý... k tomu nedávno ten návod na síťování... poslední dobou exceluješ :D.
nettezzaumana:
ten treti je pouha perlova kalkulacka ::
~> calc.pl "8 * (2 ** 6) / 100"
5.12
ps. ;) diky, navod o sitovani je starsi a bo vic to nejhodnotnejsi v nem jsou pouze odkazy na dokumentaci jinde .. moje invence temer nulova..
zdravi ntz
Marp:
Další PHP skripty zde: http://www.jaknaweb.com/scripty/php-scripty/ruzne
Navigace
[0] Seznam témat
[#] Další strana
[*] Předchozí strana
Přejít na plnou verzi