Bash zapisz do wiersza określonego pliku
# It will write into 33 Line the word "anything" into specified file
sed -i '33i\anything' path_to_file
AttractivePenguin
# It will write into 33 Line the word "anything" into specified file
sed -i '33i\anything' path_to_file
#!/bin/bash
cat > /path/to/myfile <<EOL
write whatever youwant
with multiple lines
...
EOL
/**
* A bash script to print at stdout line_number from file_name
* @line_number: the line number you want to print
* @file_name: the file you want to read from
*/
awk '{if(NR==line_number) print $0}' file_name