11,905 reputation
22339
bio website
location
age
visits member for 3 years, 6 months
seen 7 hours ago

7h
comment Parsing a HTML page with Bash
Please see stackoverflow.com/a/1732454/1524545
Jul
3
awarded  Good Answer
Jun
25
awarded  Enlightened
Jun
25
awarded  Nice Answer
Jun
25
comment Reasons why crontab does not work
@BipinVayalu, that probably means it either doesn't have access to that file, or the path does not exist. Perhaps it's scripts rather than scritps?
Jun
16
awarded  Good Answer
May
22
comment How to change extension of multiple files from command line?
@user2757729, it does replace it. "${1%.abc}" expands to the value of $1 except without .abc at the end. See faq 100 for more on shell string manipulations.
May
15
awarded  Good Answer
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