I use cat (as root) to write ISO to flash drive. Anything wrong with that?
- 0 Posts
- 11 Comments
in
[[
there is generally no need for quoting, except the right hand side of an=
comparison
in
[[
, empty strings are falsy, so this also works:[[ ! $VARIABLE1 && ! $VARIABLE2 ]] && echo "OK"
The variables need a dollar sign:
$VARIABLE1
help test
shows what-n
and-z
do.
Never use
a && b || c
. It is not the same asif a; then b; else c; fi
: whena
succeeds butb
fails, it will run bothb
andc
.I would not bother with
[
unless you absolutely need compatibility with non-bash shells.
Farnsworth@lemmy.worldto Technology@lemmy.world•Apple steps up war of words with European regulatorsEnglish41·26 days agono I don’t have that choice, see my other comment
Farnsworth@lemmy.worldto Technology@lemmy.world•Apple steps up war of words with European regulatorsEnglish41·26 days agoThis, except I won’t buy an apple device (unless forced to: in Germany an i-bad is required in many high schools, yes you need to pay for it in full with your own money, yes it needs to be an i-bad they even require a specific model)
Some employers offer intellij ultimate subscriptions. It’s even mandatory in some teams. The devs don’t have to pay out of their own pocket. But I think many of them are hooked and will lobby to keep the subscription going.
Farnsworth@lemmy.worldto Linux@lemmy.ml•Everytime I try to start something with Linux I fail.51·2 months agoTry opening a terminal an typing
echo 'Hello World!'
My two cents: You can forget about Linux for a while. Using a terminal is more important. Here’s a classic guide: https://mywiki.wooledge.org/BashGuide
The tukaani github repos are gone, is there a mirror somewhere?
Very useful for renaming a variable:
*
to search “word” under cursor. Try this with hlsearch on::set hlsearch
. Thencw
to change a match. Alternaten
and.
to quickly rename more occurrences of the word. Do a:noh
to get rid of the highlighting. Maybe try:set noinc
, some people prefer the traditional “non-incremental” search.Do all this in normal mode. Vim experts leave insert mode as soon as possible. Almost forgot: Pressing
C-c
takes you back to normal mode without leaving home row.Most important advice: Never touch arrow keys. Keep your fingers on the home row. Learn
hjkl
movement (focus onj
andk
, they are more important). Then get faster by usingb
,w
,f
,o
,O
,A
,I
,C-d
and all the rest. Learn aboutJ
, it’s cool. You won’t get far withoutu
andC-r
though.Critically important advice for fellow Europeans: If you care about vim, consider learning the US keyboard layout. Default bindings are not convenient in other layouts like qwertz (where is forward slash on qwertz? Hello?), and learning US layout might be easier than learning to customize vim. On a typical modern Linux system, there are US layout variants that still allow typing Umlauts, like EurKey or “DE-US”, where you type
ä
by pressing RightAlt+a, for example.