20,676 reputation
34577
bio website
location United States
age
visits member for 3 years, 4 months
seen 10 mins ago

Debian user, GNU/Linux enthusiast, FLOSS supporter, hobby developer.


1d
comment find the max value of column 1 and print respective record from column 2 from file
This should work but is inefficient, because sorting is overkill when the task is to find a maximum.
1d
answered find the max value of column 1 and print respective record from column 2 from file
1d
revised find the max value of column 1 and print respective record from column 2 from file
formatting
1d
reviewed No Action Needed Cant revert back to ubuntu from lubuntu
1d
reviewed Leave Open script - recursively iterate over newline delimited list using a given depth range
1d
reviewed Leave Closed Does anyone know how to make a text based game in Unix
Nov
23
awarded  Enlightened
Nov
23
awarded  Nice Answer
Nov
23
answered How can variables use “~” for cd'ing?
Nov
22
comment How to capture command line input into logfile and execute it at the same time?
@jottr Another question. Would bash history work for you or do you want this selective logging in addition to normal bash history (i.e. logged commands should go to both .bash_history and the other log file).
Nov
21
comment Calling multiple bash scripts and running them in parallel, not in sequence
There is nothing that prevents you from typing all 3 of those commands in the same line. nohup ... & nohup ... & nohup ... &. If you mean instead that you want to run all of the scripts without typing each script name individually, a simple loop will do it.
Nov
21
comment Calling multiple bash scripts and running them in parallel, not in sequence
What does "single call" mean?
Nov
21
comment How do you make case statements with ranges
Conditional probably refers to if statements. The | in a case statement is not a conditional. It is a merely a pattern delimiter.
Nov
21
revised How to capture command line input into logfile and execute it at the same time?
deleted 147 characters in body
Nov
21
answered How to capture command line input into logfile and execute it at the same time?
Nov
21
comment How to capture command line input into logfile and execute it at the same time?
@jottr Yes, functions can do just about everything an alias can. I'll post an answer.
Nov
21
comment How to capture command line input into logfile and execute it at the same time?
@jottr The least clunky method I can come up with at the moment is to make an alias like alias loglast='fc -ln -1 | cut -c 3- > ~/command.log', and then just run loglast after every command you want to log.
Nov
21
comment How to capture command line input into logfile and execute it at the same time?
You say "selectively". What is the selection criteria? Are you fine with manually typing a few extra characters for every command you want to log?
Nov
17
reviewed Leave Open Grep for searching pattern in a file
Nov
15
reviewed Close Get pairs of lines and multiply