String manipulation is a skill that is useful almost on daily basis for most IT professionals. Search, replace, count, filter, order text files from the command line make the process repeatable and fast, without too much clickety-click. Awk, sed, sort, cut, uniq are powerful tools to master. Today my focus is on sed that helped me during the migration to the new theme of my website sed (stream editor) is a non-interactive command-line text editor.
Welcome back to AirPiConsole blog post, this is part two. If you read part one and followed the configuration steps you should now have a fully working Raspberry Pi Zero W connected to your WiFi network. You should also be able to connect via Bluetooth to get a console connection without knowing the IP address of the Raspi. Now it’s time to move on and start to actually connect to the serial ports.
As a network engineer I spend a lot of time with my laptop connected via serial cable to various devices. Physical serial connection is needed for initial device setup and sometimes per customer’s security policy I can’t access the network, so I can only use out-of-band management. I also configure many devices at staging lab that I call the “Theory room” because you know, in theory everything works ;-)
Another post on Linux commands, short and simple but very useful: at. The problem As IT pros we are all comfortable with the change window concept. This window usually opens at night or during the week-end and sometimes the change actually just requires a few commands on a Linux machine. The automation The at command allows to schedule a command or script to be run at a specific time.
After a few posts about Windows software now it’s time for Linux. The problem Working with the Linux bash sometimes requires to type long commands multiple times. Isn’t that a motivation strong enough to look for a better way? The automation Linux alias is quite self-explanatory, it allows to create command aliases like with the familiar Cisco CLI. A good place to store aliases is .bashrc. Add some alias:
Scripts, usually I write some because I don’t like repetitive tasks and I’m lazy, meaning I prefer automation over useless hard work. Don’t know where I found this quote but I like it: Don't spend your time doing work a well-trained monkey could do. Today’s request was quite simple: get model and serial number from a bunch of Cisco switches. I now NEDI, Observium and LibreNMS can do that but I preferred to write a quick script I could use as a one shot tool instead of a complete software solution.
When you see an hacker movie you see people typing on the keyboard very fast. Actually the toughest the hacker is the faster he types very long commands and all of them work the first time. Want to impress friends and colleagues? Type on the hackertyper ;-) More experienced network engineers, as I learn during my CCIE studies, type in a [text language=“editor”][/text]2 then copy/paste on the CLI. This approach make easier to spot typos, faster to reuse configuration snippets and to change portions of configuration and more.
This post is part of a series about Docker, including: Docker Introduction Docker: Install software inside a container Docker Volumes Docker Networking - bridge container to host NIC We started with the basics and moved on with adding software, using volumes and then bridging a container to the network. As a said I’m neither a developer or a system administrator, I work as Network Engineer so I’m not the main target for Docker but I found it very useful for a specific need and now it’s time to join the dots.
This post is part of a series about Docker, including: Docker Introduction Docker: Install software inside a container Docker Volumes Today we’ll see Docker networking with a very specific target in mind: bridge container to the host network. This isn’t supposed to be the way of work of containers: a container should be created to run a single application so container networking, from the point of view of a Network Engineer, is essentialy a Port Address Translation with a firewall exception.
In the last post we saw that any filesystem change inside a docker container is lost if not commited to the image. What if we want to share data between containers? We can use Docker’s Data Volumes and Data Volume Containers. Data Volumes or Data Volume Containers? Data Volumes feature allows us to mount a local directory from the host inside a container. That looks good but somehow it breaks the concept of isolation between host and container.
- OLDER POSTS
- page 1 of 2