Bytt ut överklockning mot styrketräning ;)
hjlp med unix fragor i terminalen(bash 3.2)
Visa signatur
tjena mina herrar och damer,
jag behovde lite hjalp med hur man ska losa nagra fragor i unix med commands.
har ar forsta fragan ...
Create a file in your home directory called vs.txt containing only the lines of
/usr/local/data/files/3vs3847.txt
containing the STRING 'thing'. Note that 'something' and 'nothing' will match
this criteria. Ensure there are no extra blank lines in the file vs.txt. In
case there are no lines containing the string 'thing', vs.txt should be an
empty file.
[Hint: use grep and redirection]
andra fragan som jag behover hjalp med ar...
Create a file in your home directory called grep.txt containing the list of names
of files in
/usr/local/data/filer/
which contain the string 'witch' inside them (not in the filename). Ensure
there is one filename per line (WITHOUT PATHNAME), and the names are sorted in
ALPHABETICAL ORDER, that there are no extra blank lines in grep.txt, and there
are NO REPETITIONS of a filename (it occurs only once). Each line should ONLY
contain the filename, no additional detail. In the event that no lines match
then the file will be empty.
[Hint: use grep, sort and piping]
Låter som du vill ha lite hjälp med läxan ?
Jag löser inte direkta hemtetna/läxa liknande saker..
Mitt tips: Sätt dig ned med en UNIX dator och testa lite.
Bägge uppgifterna går att lösa på 1 rad var.
Testa först med att brar VISA resultatet på STDOUT,
sedan kan du STYRA om det till en FIL (när det funkar)
Testa Att skapa en egen katalog med lite text filer i sig och
kör med det istället för /usr/local/data/filer/ om du sitter hemma.
( Eller bättre kopiera /usr/local/data/filer/ hem till dig )
Copyright © 1999–2023 Geeks AB. Allt innehåll tillhör Geeks AB.
Citering är tillåten om källan anges.