logo
down
shadow

LINUX QUESTIONS

I want to extract any text between two symbol
I want to extract any text between two symbol
this one helps. I need to execute the file (a.out) and at the same time, I just need specific parts of the output, not everything. which is either located between these two string [[....]] or ((.....)). and I don't have any idea where the other text
TAG : linux
Date : December 01 2020, 04:52 PM , By : Wargamer88
Go to element position based on given Input number
Go to element position based on given Input number
should help you out You really want awk as the tool since you will be matching part of the record and then outputting a certain field based on the number contained in the input.For example, given your record stored in the file file:
TAG : linux
Date : December 01 2020, 04:50 PM , By : deeepak
"Cache" credentials on a bash script
"Cache" credentials on a bash script
Hope that helps I have created a bash script to run a few js scripts into MongoDB. Basically, what I am doing is, running the bash script and passing a parameter in this case called version, example: , Caio, As stated in my comment here's how I did i
TAG : linux
Date : December 01 2020, 04:50 PM , By : user3044723
How to use find, ls commands to display file names based on entries in an array?
How to use find, ls commands to display file names based on entries in an array?
I hope this helps you . I have an array, that contain the wildcards/filenames tha may be present in a directory. How can I display the files in a directory, whose names matches with names in the array. By the way, if possible, without using for loop.
TAG : linux
Date : December 01 2020, 04:47 PM , By : user3044653
How do you assemble, link and run a .s file in linux?
How do you assemble, link and run a .s file in linux?
this will help Linux executables require an entry point to be specified. The entry point is the address of the first instruction to be executed in your program. If not specified otherwise, the link editor looks for a symbol named _start to use as an
TAG : linux
Date : December 01 2020, 04:47 PM , By : user3044426
How to Install Postgresql 11 in Amazon Linux AMI?
How to Install Postgresql 11 in Amazon Linux AMI?
Does that help The key was the PGDG is no longer available to Amazon Linux's yum since 9.3 so the individual pieces must be installed.
TAG : linux
Date : December 01 2020, 04:45 PM , By : user3044301
sed replace string with space and special characters
sed replace string with space and special characters
around this issue The test23 file contains a line , Try changing delimiter of sed:
TAG : linux
Date : December 01 2020, 04:40 PM , By : user3043658
Should PATH contain directories or full paths to binaries?
Should PATH contain directories or full paths to binaries?
wish helps you PATH works only with directories, not with single files From the POSIX standard (emphasis mine)
TAG : linux
Date : December 01 2020, 04:36 PM , By : graum
"awk" is not processing shell variables as expected
"awk" is not processing shell variables as expected
wish helps you If new_log contains the data you want to process, not a filename, you need to pipe it to awk. You can do this with a here-string.
TAG : linux
Date : November 29 2020, 12:01 PM , By : user3042811
Linux executable file format. Where is the specification?
Linux executable file format. Where is the specification?
This might help you file tmp would have told you it's an ELF executable. See https://stackoverflow.com/tags/elf/info, and try readelf -a tmpre: file size: https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html.
TAG : linux
Date : November 28 2020, 12:01 PM , By : Dharmin
How to use sed or awk to process the content of a specified column?
How to use sed or awk to process the content of a specified column?
I think the issue was by ths following , Using sed (simple) To remove all parens that contain only letters, try:
TAG : linux
Date : November 28 2020, 12:01 PM , By : user3042547
Running docker on Ubuntu 18.04.2 LTS
Running docker on Ubuntu 18.04.2 LTS
I think the issue was by ths following , Docker is now supported on WSL2 Pre-requisite for running docker successfully on WSL2
TAG : linux
Date : November 27 2020, 12:01 PM , By : user3041980
Creating timestamps for "echo" outputs to file
Creating timestamps for "echo" outputs to file
like below fixes the issue I'm trying to create a timestamp for the information produced from the below .sh file when it is ran and the "echo"'s are performed. What is the best way to go about doing this?
TAG : linux
Date : November 26 2020, 06:28 AM , By : user3040738
Grep: using with -e and -o options together
Grep: using with -e and -o options together
this one helps. If you wish to print only bits of a file that match these 3 regular expressions and those three are never on the same line, you may use \|, which is grep's logical or :
TAG : linux
Date : November 26 2020, 06:28 AM , By : user3040707
Developing qt application for a remote device
Developing qt application for a remote device
wish helps you You can copy only the relevant dependencies. There is a existing project for this purpose, called linuxdeployqt.According to the official docs:
TAG : linux
Date : November 26 2020, 06:18 AM , By : user3040199
Linux Shell Scripting: if/else works on bash but not zsh or sh
Linux Shell Scripting: if/else works on bash but not zsh or sh
wish help you to fix your issue On ubuntu 18.04, /bin/sh is symlink to /bin/dash whose [ ... ] does not support ==. You can use [ = ] which also works for zsh.
TAG : linux
Date : November 26 2020, 06:18 AM , By : user3040116
Set environment variables from .list files of key/value pairs in .bachrc
Set environment variables from .list files of key/value pairs in .bachrc
like below fixes the issue If it helps you, instead of using source, you can put the following command. (Do it only if you are sure about contents of your file.list)
TAG : linux
Date : November 26 2020, 06:18 AM , By : user3040108
How to tell another thread that one thread is within recv() call *now*
How to tell another thread that one thread is within recv() call *now*
help you fix your problem In an earlier version, I suggested that the call to bind is optional, but of course it is not. You have to call it in order to tell the kernel which UDP port to open. After bind, the kernel will buffer incoming UDP packets a
TAG : linux
Date : November 25 2020, 12:01 PM , By : Hung
How to use exit status inside timeout bash -c command
How to use exit status inside timeout bash -c command
I wish this helpful for you What happens in your script, is that $? is expanded before bash is even run. It's always going to be zero or empty. You could do change the quotes, from " to '. Remember to expand variables that you want to expand properly
TAG : linux
Date : November 24 2020, 12:01 PM , By : user3038659
How to extract more than one value and print a correct output in a file?
How to extract more than one value and print a correct output in a file?
will be helpful for those in need I want to extract more than one value out of a filename and give it out to a *.csv file (separate with a semicolon ;) in a specific order on 1 line.
TAG : linux
Date : November 24 2020, 05:49 AM , By : user3038340
Find out when the date was changed
Find out when the date was changed
like below fixes the issue I was not able to find a solution for this (other than using a patched kernel, which I wanted to avoid).Since in my particular case all date changes occur through the date command, I finally implemented a solution that was
TAG : linux
Date : November 23 2020, 12:01 PM , By : Patty
Convert an ISO date to seconds since epoch in linux bash
Convert an ISO date to seconds since epoch in linux bash
help you fix your problem With GNU date, specify the date to parse with -d and seconds since epoch with %s
TAG : linux
Date : November 23 2020, 12:01 PM , By : Md Rasel
How to trap on_error in bash globally?
How to trap on_error in bash globally?
it helps some times By default, the ERR trap isn't inherited by shell functions.Quoting from help set:
TAG : linux
Date : November 22 2020, 12:01 PM , By : Elias Basler
Major device number 0 in Linux
Major device number 0 in Linux
Does that help Passing 0 means you're letting register_chrdev() choose a major number dynamically.In this case, the function will return that number instead of 0.
TAG : linux
Date : November 22 2020, 11:17 AM , By : Садыков Иннокентий
Linux VIM : Omnicppcomplete + supertab use bash color theme
Linux VIM : Omnicppcomplete + supertab use bash color theme
Any of those help Open your colorscheme. Find the lines that start with hi Pmenu*. Edit them to your liking. If there's no such line in your colorscheme, add the lines below and change the colors to what you want:
TAG : linux
Date : November 22 2020, 11:12 AM , By : Mohamed Farah
R - makeCluster hangs on localhost in Linux
R - makeCluster hangs on localhost in Linux
wish help you to fix your issue Answering my own question..For anyone else in this situation (many threads online but none regarding snow), the reason it didn't work was because it didn't have enough memory to allocate.. I cleared my workspace and lo
TAG : linux
Date : November 22 2020, 11:05 AM , By : Veysi Sayol
Unix Replacing Backslashes within files recursively
Unix Replacing Backslashes within files recursively
This might help you I have a large directory tree structure with text files (php, html, etc). I need to search for a string that occurs frequently throughout these files and flip the \ to a /. I need this to recursively traverse the entire structure.
TAG : linux
Date : November 22 2020, 11:05 AM , By : mobin asri
Eval not working with linux makefile
Eval not working with linux makefile
it should still fix some issue What you want is $(shell...)
TAG : linux
Date : November 22 2020, 11:05 AM , By : Zhan Choe
update Conf File using perl
update Conf File using perl
Any of those help I am using perl script to update sections in conf file . my script i working properly but when i execute script the ordered on sections changed automatically while i dont want to change the order.script is following . , From the doc
TAG : linux
Date : November 22 2020, 11:05 AM , By : Abhishek Gupta
Use of Grep command using regular expression
Use of Grep command using regular expression
it should still fix some issue
TAG : linux
Date : November 22 2020, 11:02 AM , By : Nithish Kumaran
iptables LOG and DROP in one rule
iptables LOG and DROP in one rule
With these it helps I am trying to log outgoing connections with iptables. What I want is, drop and accept connection while logging them also. I have found that -j option takes DROP/REJECT/ACCEPT/LOG. But I want to do something like DROP and LOG or A
TAG : linux
Date : November 22 2020, 11:02 AM , By : Ellison Ebenezer
MAC OS X alias folder/file do not persist on Windows
MAC OS X alias folder/file do not persist on Windows
Any of those help Mac filesystems can attach a several kinds of metadata to files that are not supported by other filesystems, such as those Windows uses. Depending on exactly how the file is moved between systems, this metadata may or may not be pre
TAG : linux
Date : November 22 2020, 11:02 AM , By : Darkazn
Linux Kernel Module Character Device Permissions
Linux Kernel Module Character Device Permissions
will help you You can do it by setting the dev_uevent method in the class structure. In this method you have to set the DEVMODE uevent variable. Here an example
TAG : linux
Date : November 21 2020, 07:35 AM , By : Necromancer 5211
Path variable: Find folder path of specific file
Path variable: Find folder path of specific file
I think the issue was by ths following , On Linux and other Unix-likes, how do I find the path to a specific file that I can use because of the PATH environment variable? For example, if I can use, from the command line:
TAG : linux
Date : November 21 2020, 07:35 AM , By : PeterS
Version control on shared web host with Bazaar
Version control on shared web host with Bazaar
I wish this help you Before you can commit revisions, you need to set a name and email address. These are important metadata in a commit. You can set these in the Settings | Configuration | User Configuration menu. On the General tab enter the Name a
TAG : linux
Date : November 20 2020, 12:01 PM , By : Lawrence Chas Kane
History command works in a terminal, but doesn't when written as a bash script
History command works in a terminal, but doesn't when written as a bash script
I wish did fix the issue. Looking at your history only makes sense in an interactive shell. Make that command a function instead of a standalone script. In your ~/.bashrc, put
TAG : linux
Date : November 18 2020, 03:46 PM , By : too
Escaping a space in bash
Escaping a space in bash
With these it helps You cannot safely embed spaces in a string like this; there is no way, after expanding CMAKEARGS, to know which spaces are data and which simply separate words (or rather, bash assumes all spaces are word splitters; embedded quota
TAG : linux
Date : November 18 2020, 03:46 PM , By : AKuszmaul
What are the odds of a PID getting assigned to the same process after a wraparound?
What are the odds of a PID getting assigned to the same process after a wraparound?
I hope this helps . "What are the odds" is a statistics question, and the answer depends on how many other processes there are, and how often they fork() and how often they exit(), so the exact answer is difficult to calculate. Anywhere between "almo
TAG : linux
Date : November 18 2020, 12:01 PM , By : Doron Tsuberi
yielding from linux kernel
yielding from linux kernel
it helps some times You can use the sched_yield() function to yield the rest of your time slice, as discussed here.
TAG : linux
Date : November 18 2020, 12:01 PM , By : HaGe
bash array working in command prompt but not working when executing as ksh
bash array working in command prompt but not working when executing as ksh
To fix this issue The ksh (there's more than one) in this case is the old Solaris ksh88 as *(/usr)/bin/ksh, which was the default ksh until (and including) Solaris 10.ATT open-sourced ksh93 back in 2002 or so, which was adopted later into linux and v
TAG : linux
Date : November 17 2020, 12:01 PM , By : Ben
Extracting several rows with overlap using awk
Extracting several rows with overlap using awk
I think the issue was by ths following , I have a big file that looks like this (it has actually 12368 rows):
TAG : linux
Date : November 17 2020, 12:00 PM , By : Ovis J.
How to return substring from a linux command
How to return substring from a linux command
this one helps. I'm connecting to an exadata and want to get information about "ORACLE_HOME" variable inside them. So i'm using this command: , Awk and grep are good for these types of issues.New:
TAG : linux
Date : November 17 2020, 12:00 PM , By : Steven
IBM Worklight 6.1 - Failed to migrate Worklight project
IBM Worklight 6.1 - Failed to migrate Worklight project
I wish this helpful for you Navigate to your temp directory and delete the wlBuildResources folder. Re-build of the project should fix this issue.
TAG : linux
Date : November 17 2020, 08:25 AM , By : Man Ioan
Unable to get md5 hash
Unable to get md5 hash
wish help you to fix your issue You made some mistakes, I've corrected them. Also I've added hexadecimal output of the hash. Otherwise it will break your terminal.
TAG : linux
Date : November 17 2020, 08:25 AM , By : stas monster
NodeJS and npm without sudo on CentOS
NodeJS and npm without sudo on CentOS
this will help You could simply chown your /opt/ directory and future calls to npm init will be owned by you. Better yet, work in your /home folder and make sure npm and node are in your $PATH. This way you don't need to worry about permissions for i
TAG : linux
Date : November 17 2020, 08:25 AM , By : Muhammad Anees
Merge one folder with sources into another
Merge one folder with sources into another
This might help you Use one of comparison tools which supports compare directories.Beyond Compare, Meld, Krusader, ... (http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools)
TAG : linux
Date : November 17 2020, 08:25 AM , By : devknob
Getting errors when installing pymc on Linux
Getting errors when installing pymc on Linux
wish of those help Looks like you need to install the fortran compiler? You also might get better results doing a "sudo pip install pymc"
TAG : linux
Date : November 16 2020, 12:01 PM , By : S.T
How to efficiently get 10% of random lines out of the large file in Linux?
How to efficiently get 10% of random lines out of the large file in Linux?
Hope that helps I want to output random 10% lines of total lines of a file. For instance, file a has 1,000,000 lines then I want to output random 100,000 lines out of the file (100,000 being the 10% of 1,000,000) . , I think this is the best way:
TAG : linux
Date : November 16 2020, 06:27 AM , By : bullmorepsigas
Get open ports count in ubuntu distro.
Get open ports count in ubuntu distro.
To fix this issue You can use netstat -anltp | grep "LISTEN" to list all open ports.Try this for the count: netstat -anltp | grep "LISTEN" | wc
TAG : linux
Date : November 14 2020, 05:18 PM , By : R.C.
How to resolve dependecies while running a shell script remotely?
How to resolve dependecies while running a shell script remotely?
hop of those help? I think your problem is the working directory. Try something like this:
TAG : linux
Date : November 14 2020, 05:16 PM , By : Sahana Mohandoss
Counting open files per process
Counting open files per process
will be helpful for those in need I'm working on an application that monitors the processes' resources and gives a periodic report in Linux, but I faced a problem in extracting the open files count per process. , Have a look at the /proc/ file system
TAG : linux
Date : November 14 2020, 05:16 PM , By : DsRoyster
shadow
Privacy Policy - Terms - Contact Us © festivalmusicasacra.org