Re: [CLI] - Naredbe u terminalu - trikovi i savjeti
Postano: 09 ožu 2016, 17:11
U skriptiranju je, no općenito u korištenju terminala ništa preznačajno nisam primijetio. Ima dosta kul dodataka. Isprobaj pa vidi. 
Regionalni Linux forum
https://www.linuxzasve.com/forum/
Kod: Označi sve
jurastublic@mint17xfce ~ $ w3m -dump https://fishshell.com/docs/current/tutorial.html | grep -A5 "Unlike other shells"
Unlike other shells, fish has no dedicated syntax for setting variables.
Instead it has an ordinary command: set, which takes a variable name, and then
its value.
> set name 'Mister Noodle'
> echo $name
--
Unlike other shells, variables are not further split after substitution:
> mkdir $name
> ls
Mister Noodle
--
Unlike other shells, fish stores the exit status of the last command in $status
instead of $?.
> false
> echo $status
1
--
Unlike other shells, fish does not have an export command. Instead, a variable
is exported via an option to set, either --export or just -x.
> set -x MyVariable SomeValue
> env | grep MyVariable
MyVariable=SomeValue
--
Unlike other shells, fish does not use backticks ` for command substitutions.
Instead, it uses parentheses:
> echo In (pwd), running (uname)
In /home/tutorial, running FreeBSD
--
Unlike other shells, fish does not have special syntax like && or || to combine
commands. Instead it has commands and, or, and not.
> cp file1.txt file1_bak.txt; and echo "Backup successful"; or echo "Backup failed"
Backup failed
--
Unlike other shells, arguments are not passed in "numbered variables" like $1,
but instead in a single list $argv. To create a function, use the function
builtin:
> function say_hello
echo Hello $argv
--
Unlike other shells, fish does not have aliases or special prompt syntax.
Functions take their place.
You can list the names of all functions with the functions keyword (note the
plural!). fish starts out with a number of functions:
--
Unlike other shells, there is no prompt variable like PS1. To display your
prompt, fish executes a function with the name fish_prompt, and its output is
used as the prompt.
You can define your own prompt:
--
searches for commands. Unlike other shells, $PATH is a list, not a
colon-delimited string.
To prepend to $PATH, you can write:
> set PATH /new/path $PATH
jurastublic je napisao/la:
Probaj provjeriti jesu li kodovi koje šalje tipkovnica ispravni i jesu li pravilno mapirani.
Kod: Označi sve
grep -iA5 -e press -e release <(xev)
Post iz rasprave o opasnim naredbama ovdje.jurastublic je napisao/la:Problem je to što linux distre obično dolaze konfigurirane bez limita na broj pokrenutih procesa.
Taj limit može postaviti u /etc/security/limits.conf
Otvori se kao administrator i dodaju se ovako dvije linije ispod onih zakomentiranih (i restarta komp):
Meni se za desktop 600 i 300 pokazalo OK. Inače mi ukupni broj procesa praktički nikada ne pređe 200.Kod: Označi sve
#dududu nema nam pomoći #dudududu dudududu root hard nproc 600 jurastublic hard nproc 300
@Vl@do tako je uređen prvi post. Dali ima neki razlog za ovakvom bojom? Meni je skroz ne čitljiva.Vl@do je napisao/la:Terminal Emulator
Vl@do je na LZS dark temi pa je njemu superNoMaam je napisao/la:@Vl@do tako je uređen prvi post. Dali ima neki razlog za ovakvom bojom? Meni je skroz ne čitljiva.Vl@do je napisao/la:Terminal Emulator
Pozz
A je ti ova tamno zelena ružna u dark temiVl@do je napisao/la:Dobro, ajde, promijenit ću. A koju da stavim, tamnozelenu?
EDIT: nadam se da je sada u redu, ali oni koji imaju tamnozelenu pozadinu opet neće vidjeti ništa.
Tako ću i napraviti, ali ne "obavezno", nego "Za najbolji pregled savjetujem korištenje dark teme...kao i u pravom tty-u".bertone je napisao/la:Trebao si ostaviti kako je bilo i napisati napomenu na početku ili kraju prvog posta da je obavezno korištenje dark teme
