Skip to content

Working with complex CSV from Linux command line

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…

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…

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

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 &#821…

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…