20,880 reputation
34677
bio website
location United States
age
visits member for 3 years, 4 months
seen 9 hours ago

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


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
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
14
comment Strange bash sytax error depending on sudo usage
He's running it as ./scriptname and the shebang is clearly #!/bin/bash. I would be puzzled as to why sh would get invoked here.
Nov
14
comment How do I define alias with variables which can be changed at runtime?
It's not clear exactly what your example commands are supposed to do, but try taking a second look at functions. Functions are basically more powerful versions of aliases.
Nov
13
comment tmux vim colorscheme background is not showing
In my experience, tmux behaves strangely when launched inside gnome-terminal. Try launching tmux with TERM=xterm tmux and see if it behaves differently. If xterm doesn't work, try xterm-256color or xterm-color.
Nov
13
comment what is the difference between `find .` and /home/user/* as an input to for command
@edwardtorvalds For the problem pointed out by the Wheeler link, use ./* and the problem is solved. The wheeler link is irrelevant to your first comment about abc def.txt though. I still do not know what you were trying to say with your comment about abc def.txt.
Nov
13
comment what is the difference between `find .` and /home/user/* as an input to for command
@edwardtorvalds Can you provide more information? * should match a file named abc def.txt. If it doesn't something is wrong so tell exactly what you type and exactly what output you get.
Nov
13
comment Autostarting Conky Weird Behaviour
It sounds like conky is running in the foreground. Try killing everything conky related and running it from a terminal, to see if it returns you to your prompt immediately or not.
Nov
13
comment what is the difference between `find .` and /home/user/* as an input to for command
ls --quoting-style=shell would not help. Only literal quotes are actually treated as quotes. Any quote characters that happen to result from expansions are not special. You would have to use eval to get the shell to reparse expanded output, and I would not really recommend that.
Nov
13
comment Script to see if user has logged off
You could simply change until to while, but I do not think this is the most efficient or elegant method to be notified of user login activity.
Nov
12
comment any way to get rotation cube on xmonad/i3
Considering how compiz is a window manager and xmonad is a window manager, I'd guess that you can only have one or the other. There isn't a tiling wm that I know of that has compiz-like effects.
Nov
12
comment How to map emacs multi-modifier keys in vim?
This seems to be a quirk of the CTRL-C mapping, which is the interrupt key. For some reason, this mapping only starts working after tweaking the Ctrl-C key in some way. Try imap <C-c> <Nop> followed by iunmap <C-c> and your mapping may start working.
Nov
11
comment For loop for curling on multiple pages with API's
I am not familiar with how that site works. See what you can find out by yourself and then post a separate question if you still need help.
Nov
11
comment For loop for curling on multiple pages with API's
We can't help you because we have no idea what site you are using or how it works.
Nov
10
comment Search 2nd line of files and print filenames to stdout
@chishaku Just use if ($0 ~ /search string/) print FILENAME; instead of print FILENAME ...;.