Grep count of processes running more than x minutes

Bash
My goal is to grep for a count of processes older than 'x' minutes in bash. So far, I can grep for all the process execution times: ps -eo etime,cmd...
4 years ago

Bash regexp: How to replace all non-whitespace characters with a letter?

Bash
I have a text file that contains a lot of whitespace and some other ASCII characters. I would like to use Bash (preferably via sed) to replace any non...
4 years ago

How could I parse an output command with shell scripting?

Bash
I'm working on a shell script that is an interface for Git using Whiptail (shell interface). There is my problem, I would like to create a menu where...
4 years ago

Unix shell's input redirection not working

Bash
I found the same question but there was no answer. In building my own unix shell, my output redirection is working fine, but when I try the input it ...
4 years ago

Why pstack is much faster than gdb with just attaching, saving stacks and quitting?

Bash
I have a script, which runs gdb with command file like this: set logging file file_name set logging on thread apply all bt q y Why pstack is much f...
4 years ago

modifying /etc/profile linux

Bash
I need to change the greeting of user, which is logging in. So I modifyed file /etc/profile. In this greeting I need to know, which shell this user us...
4 years ago

Why do I get a "sqlite3: not found" error on a rooted Nexus One when I try to open a database using the adb shell?

Bash
# sqlite3 /data/data/com.moodme.android/databases/moodme sqlite3 /data/data/com.moodme.android/databases/moodme sqlite3: not found ...
4 years ago

Pipeline Shell Script Permission Issue on .NET Build Attempt

Bash
I am trying to build an ASP.NET5 application via Bluemix Pipeline using a shell script to configure a runtime that supports .NET builds with dnvm. Whe...
4 years ago

unix - count of columns in file

Bash
Given a file with data like this (ie stores.dat file) sid|storeNo|latitude|longitude 2|1|-28.03720000|153.42921670 9|2|-33.85090000|151.03274200 Wh...
4 years ago

Obtaining the total of coincidences with multiple pattern using grep command

Bash
I have a file in Linux contains strings: CALLTMA Starting Starting Ending Starting Ending Ending CALLTMA Ending I need the quantity of any string (...
4 years ago

How to print all the columns after a particular number using awk?

Bash
On shell, I pipe to awk when I need a particular column. This prints column 9, for example: ... | awk '{print $9}' How can I tell awk to print all...
4 years ago

Bash Completion script to complete file path after certain arguments options

Bash
I am writing a bash completion script for a command-line tool: _plink() { local cur prev opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}...
4 years ago

Export C #defines as shell variables

Bash
In my project, a number of paths to various directories, files and other components of the system are stored as #defines in a filenames.h, a file incl...
4 years ago

What does "&" at the end of a linux command mean?

Bash
I am a system administrator and I have been asked to run a linux script to clean the system. The command is this: perl script.pl > output.log &am...
4 years ago

Bash wildcard pattern using `seq`

Bash
I am trying the following command: ls myfile.h1.{`seq -s ',' 3501 3511`}* But ls raises the error: ls: cannot access myfile.h1.{3501,3502,3503,350...
4 years ago

Need some help on awk/grep command on shell script

Bash
This is in reference to Need some help on shell scipt (using grep command) I have a log file and I am trying to write a shell script to find pause/pl...
4 years ago

How to find out uptime in minutes?

Bash
How to find out and save to file uptime on Solaris in minutes without cutting and converting it ? Is there any elegant way of doing it? Thanks for ans...
4 years ago

awk split files and keep the filename

Bash
Using awk to split up files into chunks of 5000 lines for each file and rename them sequentially. I need to keep the original file name as part of the...
4 years ago

tips on using a variable length in awk printf

Bash
I am a beginner in awk. If I have an input of id varchar(2), name varchar(10), address varchar(20) Can I use awk to make it look like id v...
4 years ago

Extend ps output to more than 80 characters in Solaris 8

Bash
How do you extend the output of ps -fe in Solaris so that it displays more than 80 characters? My process has several arguments and the process name c...
4 years ago