Skip to content

Commit 923c6aa

Browse files
committed
Small syntax updates of examples.
1 parent 29206e5 commit 923c6aa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

presentation/linux_bash_metacentrum_course.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ \subsection{Variables}
20732073
\begin{frame}[fragile]{Examples of redirects and pipes when working with molecular data II}
20742074
\begin{bashcode}
20752075
# How many FASTQ reads are there in the file
2076-
cat file.fastq | echo "$(("$(wc -l)" / 4))"
2076+
echo "$(("$(wc -l file.fastq)" / 4))"
20772077
# Count number of *.FNA or *.fasta files in current directory
20782078
find . -maxdepth 1 -name "*.FNA" -o -name "*.fasta" | wc -l
20792079
# Same as above, saving output to the file
@@ -2250,10 +2250,10 @@ \subsection{Network}
22502250
# (22 for SSH, can be any)
22512251
nc -vz web.natur.cuni.cz 22
22522252
man nc # See for more information; "nc" is alias for "netcat"
2253-
netstat -atn # Information about all network connections
2254-
netstat -ntplu # Show open TCP/UDP ports
2255-
netstat -anp # Show active connections
2256-
ss --help # netstat is deprecated, prefer usage of ss
2253+
ss -atn # Information about all network connections
2254+
ss -ntplu # Show open TCP/UDP ports
2255+
ss -anp # Show active connections
2256+
ss --help # More options...
22572257
# If using nmap at faculty, firewall disconnects you for 10 minutes!
22582258
nmap -r someserver.cz # Scan someserver.cz for opened ports
22592259
nmap botany.natur.cuni.cz --script ssh-hostkey # See SSH key

0 commit comments

Comments
 (0)