Latest posts

Luca Lanziani

Read file in chunks in bash

How to read a file in chunks. You can optionally specify the starting point and the chunk size.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

function read_file_in_chunks { # FILENAME [START_FROM_LINE] [CHUNK_SIZE]
   FILENAME="$1" && shift
   START_FROM_LINE ...

Luca Lanziani

Post from mobile

Just for fun.

printf("Hello Franco");
printf("Hello Federico");
printf("Hello Enrico");

Luca Lanziani

Browser as notepad

From time to time I need to note something down, from a snippet of code to some lorem ipsum.

Of course I can open a text editor and paste the text there but is it worth it to keep another window around when I have already a browser open in ...