Tags » Bash

Unset readonly variable in bash

While writing post, I’ve used readonly statement. While testing, troubleshooting and debbuging your code, sometimes you need to unset the variable… Here’s the solution:

$ unset GUARDYVAR
bash: unset: GUARDYVAR: readonly variable
$ echo $$ #get the PID of current shell
17219
$ gdb
GNU gdb (GDB)
[...]
(gdb) attach 17219
Attaching to process 17219
[...]
(gdb) call unbind_variable("GUARDYVAR")
$1 = 0
(gdb) detach 
$ unset GUARDYVAR
$ #no error
$ echo $GUARDYVAR
$ #no output
… 7 more words
Technical

Bash script dry-run or rather syntax validation, to be precise

Recently was wondering, if it is possible to validate the bash script. bash --help wasn’t much useful, but on the other wasn’t completely useless. It came up with the following suggestion: 581 more words

Technical

Auto login to linux console on boot

Auto login can be enabled to a console(tty) in linux on boot.If you want to activate it for specific console, change the configuration as below. 50 more words

Linux

Know speed of serial port in Ubuntu

stty command can be used to get the speed and other details of serial ports in Ubuntu machine.

stty -F /dev/ttyS0

Output:
speed 9600 baud; line = 0;

8 more words
Linux

Amber Rose Proves She's The Selfie Queen With A Jaw-Dropping New Flick (PHOTOS)

Amber Rose has been laying low on Instagram for the past week and a half by posting memes and pics of her friends rather than sharing any pictures of herself. 91 more words

Entertainment

Archivos con nombres que cambian con la fecha

Estaba necesitando crear un archivo con bash (script) que tenga como nombre la fecha de su creación.

Eso en esencia es sencillo:

touch “$(date + ‘d%_%m_%y_%H_%M_%S’)” 190 more words

Server

It's 10 o'clock -- Do you know where your columns are?

Anyone who works in data analysis knows that any assumptions that you make about the formatting of the data that you receive are bound to be wrong. 251 more words

Coding