Skip to content

Commit 2e81249

Browse files
committed
Notes about diff and compressed text.
1 parent d05abd4 commit 2e81249

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

presentation/linux_bash_metacentrum_course.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,7 +3042,7 @@ \subsection{Compressed text}
30423042
zgrep FORMAT arabidopsis.vcf.gz
30433043
# 'less -S' displays long lines without indent (use R/L arrows to move),
30443044
# zless doesn't have such option - use as follows:
3045-
zcat arabidopsis.vcf.gz | less -S
3045+
zcat arabidopsis.vcf.gz | less -S # zless doesn't have the -S option...
30463046
# Display file compressed by bzip2
30473047
bzless Oxalis_hirta_R2.fastq.bz2
30483048
# Get end of the file
@@ -3053,6 +3053,7 @@ \subsection{Compressed text}
30533053
\begin{itemize}
30543054
\item Not all commands to work with text have variant to work with compressed files\ldots
30553055
\item Variants to work with compressed files sometimes don't have all options\ldots
3056+
\item Sometimes it's the best to pipe \texttt{zcat}/\texttt{bzcat} and another tool
30563057
\end{itemize}
30573058
\end{frame}
30583059
@@ -3114,10 +3115,10 @@ \subsection{Comparisons}
31143115
\vfill
31153116
\begin{bashcode}
31163117
# Create the diff file
3117-
diff -u diff_test_file_1.txt diff_test_file_2.txt > difference.patch
3118+
diff -u diff_test_file_1.txt diff_test_file_2.txt > difference.diff
31183119
# Apply the patch
3119-
patch < difference.patch # or
3120-
patch diff_test_file_1.txt difference.patch
3120+
patch < difference.diff # or
3121+
patch diff_test_file_1.txt difference.diff
31213122
\end{bashcode}
31223123
\end{frame}
31233124

0 commit comments

Comments
 (0)