I am creating a yaml file in GitHub Actions to install softwares on Linux servers created using terraform. Using the pipeline i am able to ssh into the linux servers. In one of the servers i am creating a .ssh directory and an id_rsa file (which contains the private key of the other server) which i intend to …
Tag: cat
using only ‘grep’ command to get specific column
This below shows this some lines of csv file, i want to get the results that only get the Population column with only using grep command. results i want: The command i made for this problem was which got results below how can i get rid of the rest of things without using awk sed or any other things? Answer
Linux Internal Process for Cat and Grep [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I’m newbie to linux back round process, for example i have the below linux command, Ma…
how to view contents of asm diskgroup contained file?
I’ve just transferred my oracle 11g 11.2.0.4 DB to ASM and I want to look at the contents of some of the files. At first I tried using ASMCMD but then realized it doesn’t have such a command, and when trying to read from the diskgroup path it returns “no such file…”. is there any…
How can I use the cat command to read from a character device with my own character device driver?
I am trying to write a simple read/write character driver for a beaglebone. One of the tasks is to be able to use the cat command to read from the device, but I am unable to do so. Here is the code for my read function for my character device driver located inside char_drvr.c: Read executes successfully (the …
Fast way to grep gzipped files in reverse piped to tail/head
I need to search a folder of gzipped files for a string, however I need to search starting at the bottom of each file. I then need the command to return results when it has 10 matches. So far I have this: I’m using zcat to get all the file contents, and then I use tac to reverse them. This
PostgreSQL COPY FROM STDIN not working, but FROM PATH works
In PostgreSQL I previously created a table like so: The idea is to import multiple csv files into this table. My approach is to use COPY … FROM STDIN instead of COPY … FROM ‘/path/to/file’, as I want to be able to cat from the shell multiple csv files and pipe them to the sql script. T…
Why cat 0>file doesn’t work
In Unix, I know that 0 1 and 2 represent stdin stdout and stderr. As my understanding, the command cat meaning “concatenate” can concatenate different files. For example, cat file>&1 can concatenate the file and the stdout and the arrow means the redirection from the fileto the stdout, so w…
How to traverse when using `cat` command? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago. Improve this question How to travel in the shell using cat command? (arrow keys are not working) Answer I think yo…
Combine 3000k txt files into one txt file Linux
I want to combine 3000k txt files in one txt file Tried this: But this is gives an error How to do this Answer You can use find for that: * expansion has limits because bash expands it into every single filename and arguments are limited by kernel setting MAX_ARGS_PAGES (see http://www.linuxjournal.com/articl…