I have a complex CSV file (here is external link because even a small part of it wouldn’t look nice on SO) where a particular column may be composed of several columns separated by space. For viewing I am using this trick column -s,$’t’ -t < *.csv | less -#2 -N -S which is an upgraded ver…
Sending an arrow key with fprintf
I’m testing out pipes and have hit a little road block. I want to be able to simulate pressing the right arrow key through a file pointer opened by popen. The file pointer opens a display program on a different terminal, much like a projector. I would like to send a signal to advance the next image (the…
How can I work on files on my server and keep them in sync?
I have set up a development web server using VMWare and Debian. It’s all set up fine, but I have an problem. I need to be able to work with the files on the server, or a copy of them. But, it’s important that both sets of files are in sync. For example, in my text editor if I’m working
Copy and replace file recursively
I try to find a way to copy and replace files recursively. Example: Folder /home/test/ You can see that in folder /home/test I have more and more folders (1,2,3,4) which file name ‘test.jpg’. I have a file /home/test.jpg Question: How to replace file ‘test.jpg’ in 1/2/3/4(folders) with…
How to send facebook message from linux console (command-line)
Old days many admins use sms-gates for sending important informations from their systems e.g. “Power down, UPS is working now!”, “Power Up, UPS is off!” or “CPU Temp too high!”. Today in Facebook era we use messenger instead of SMS, so I wonder if I could create a command-l…
SSH to multiple machines using a batch file
I have a large number of Linux devices that i want to be able to SSH into and change the netmask. I wanted to create a batch file to do this so that i can export a list of the IP addresses and then run a batch to change the netmask. I expected my script to be something along the
Why doesn’t Linux prevent spawning infinite number of processes and crashing?
With the very simple code below, my system (Ubuntu Linux 14.04) simply crashes not even letting my mouse respond. I had to force quit with the power button. I thought Linux is a stable OS tolerable of handling such basic program errors. Did I miss something? Answer Congratulations, you’ve discovered the…
Clean console on assembly
Is there anything similar to system(“cls”); that exists on C for Assembly? I’m using NASM to compile and I’m working on a x86 linux. UPDATE 1: Here’s my modified code to integrate sugestion: Cheers Answer To imitate the terminals clear command have in a .data section: then whenev…
Multiple Oracle versions using Perl
Have one system monitoring two Oracle Databases with different versions 12.1 and 10.1 Oracle client, sdk, sqlplus installed for each and I can query either 12.1 db or 10.1 by setting theses after setting appropriate values for But Perl does not seem to pick up the the different versions. I get: CRITICAL ̵…
How can I redirect the output of a process file write?
I have a legacy app running that sends its output to log files. Rather than tail and manage those log files, I want to capture the output before it hits the disk and send it off elsewhere on the network (using syslog, or fluentd, or logstash, etc.). Is there any way I can capture the output without changing t…