Bash: File content tricks

Using bash to get some data from the files can be very useful. Here are some essential tricks to get you started.

  1. See if the file has a word called “hello”:

cat file.txt |grep hello

  1. Compare two files using cmp / cmp is usually part of the diffutils package.

This part is best done with simple script. However, scripting is not mandatory when using cmp.

#!/bin/bash

# Creating two new files with: echo "Helllo" > file.txt && echo "Hello" > file2.txt

file1="file.txt"
file2="file2.txt"

if cmp "$file1" "$file2"; then
echo "Files are the same."
else
echo "Files are not the same."
fi

Continue reading

PostX Gnu/Linux delayed to December, new filemanager coming

I have decided to delay PostX Gnu/Linux release to be at the end of December. It´s better to tune the features to their peak rather than do a too early release. The previous having said, there is a new filemanager coming soon. This will likely be the default on the upcoming distribution release. Here is a development screenshot.

Spin FM dev screenshot.

Still in development quality code of Spin FM will be released during the next weekend.