1,789 reputation
814
bio website e-choroba.blogspot.cz
location Czech Republic
age 38
visits member for 1 year, 11 months
seen yesterday

Bash, Perl, Linux. Programming & teaching.


Jun
29
comment Store the return string to a variable from zenity
stackoverflow.com/q/24474286/1030675
Jun
24
comment Echo script arguments from function
Is the function defiend inside the script? If so, you can store the argumants to a global array.
Jun
14
comment Change directory structure from /YEAR/MONTH/DAY/ to /YEAR-MONTH-DAY
Do you mean you already have a structure and you want to flatten it? Do you want to create one directory per day? Should the path change, but the filenames stay?
Apr
29
comment Solving $PATH obfuscation by /bin/sh (dash)
What do you mean by "reserves %"? I was able to create a file named %a%b%c and copy it.
Apr
28
comment Why is program not executed even though it is in my path?
Can you just rehash your shell? hash -r for bash.
Apr
26
comment How to make a shell script pipe aware
I have a strange feeling I met this question somewhere else. And I asked the very same questions as @gniourf_gniourf.
Apr
15
comment Bash script for execute one command for many files
What is in results.out after the script finishes?
Apr
7
comment How to tar the n most recent files with spaces in filename?
@dabadaba: Always use the right tool for a job shrug
Jan
4
comment Shell script while statement
Also, you should use "$FILE" in double quotes in case the file name contained special characters like spaces, or if the user just pressed Enter without giving any file name.
Dec
10
comment Concatenation in Shell Scripting Bash
@Mina: ++$i increments the variable $i and returns its new value. Insert it as the second parameter to each print join.
Nov
6
comment Emacs editor copy and deletion
emacswiki.org/emacs/CopyAndPaste
Sep
26
comment Running a .sh file without root
chmod is usually not restricted to privileged users. If your university does not allow you to execute arbitrary files, you probably should not run the game.
Aug
21
comment Which one is better: using ; or && to execute multiple commands in one line?
Also note that running your script with set -e will stop the script on failure as if all the commands were connected with &&.
Aug
21
comment Which one is better: using ; or && to execute multiple commands in one line?
@Private: You should use ; if the second command does not need the previous one to succeed.
Aug
13
comment Setting default path when opening a terminal session
What terminal do you use?
Aug
6
comment Exclude from * in command line
@David: Exactly.
Aug
1
comment single line group of commands as individual?
@Jai: Please give more details. I do not understand.
Jul
29
comment Cannot access /etc/hosts
How are you trying to open it? Aren't you trying to run it?
Jul
9
comment wait for dd command to fully write to the disk
I am not sure, byt sync might wait.
Jul
9
comment wait for dd command to fully write to the disk
Have you tried sync?