10,999 reputation
21938
bio website
location
age
visits member for 3 years, 3 months
seen 17 hours ago

Apr
13
comment Pause execution and wait for user input
The shebang is wrong. You're using bash features, so the shebang must be set to #!/usr/bin/env bash or #!/bin/bash.
Apr
13
comment Why is this command starting endless terminals and how to make it work?
Don't embed the arguments into the script. That is very error prone. Instead, pass them on as arguments: gnome-terminal -x bash -c 'cd ~/Downloads/youtube && youtube-dl "$@"; read -p "Press [Enter] key"' _ "$@"
Apr
13
answered Why is this command starting endless terminals and how to make it work?
Apr
13
comment Why is this command starting endless terminals and how to make it work?
ok, that doesn't seem to spawn a terminal, so it doesn't answer the question of why it's recursing. Are you sure n-youtube-dl is that python script and not actually your wrapper itself?
Apr
13
comment Why is this command starting endless terminals and how to make it work?
What does /home/user23/bin/n-youtube-dl look like?
Apr
7
answered zip I/O error: Protocol error in bash script
Apr
6
awarded  Nice Answer
Apr
4
awarded  Nice Answer
Mar
24
comment Inserting a date and time of execution of a bash script into a file
It makes the script harder to maintain. What if command foo is at /bin/foo on one system, but /usr/bin/foo at another? you'd have to go through the entire script changing it from one to the other. If you don't know what PATH is set to, set it yourself at the start of the script.
Mar
24
comment Inserting a date and time of execution of a bash script into a file
I recommend against using absolute paths to commands. It is not more secure. setuid bit on scripts doesn't work. It is disabled.
Mar
14
comment Moving files from several subdirs to a main dir
Also missing quotes around *.jpg. It works fine without escaping the * ... until run it while standing in a directory that happens to have files ending in .jpg.
Mar
14
answered find/tar combination to backup certain files at one level, and all files in one subdirectory
Mar
11
comment Why ~/.bash_profile is not getting sourced when opening a terminal?
@terdon, yes, but bash is not involved when logging in graphically, so it goes straight for .profile.
Mar
10
awarded  Great Answer
Mar
6
answered Basic bash printing question
Feb
21
comment Oneliner command to use kill given tcp port number instead of PID?
Still, mvn jetty:stop is not the same as sending SIGTERM, and the jvm should still be able to process SIGTERM even though its application(s) is out of mem.
Feb
21
comment Oneliner command to use kill given tcp port number instead of PID?
Using SIGKILL is usually a bad idea. Any reason why you don't want the process to clean up after itself?
Feb
10
awarded  Caucus
Feb
10
revised ./setup.sh Permission denied
some missing newlines
Feb
10
comment ./setup.sh Permission denied
@Fischer, Well, even with sudo, you won't be able to execute a file if it doesn't have the execute bit... so you won't get around a chmod. And there's nothing in the question suggesting user246638 wants to install something globally.