1,518 reputation
814
bio website e-choroba.blogspot.cz
location Czech Republic
age 38
visits member for 1 year, 8 months
seen 14 hours ago

Bash, Perl, Linux. Programming & teaching.


15h
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?
May
24
comment Bash alias not found stuck on my terminal
Can you cat your .bashrc and paste the added lines here?
May
14
comment /usr/bin/env: bash: Permission denied
As what user do you connect to the server? Whose .bashrc have you edited?
Apr
29
comment trivia bug in bash script
@AhmedZainElDein: You probably misunderstood me. Put a space between -e and "sudo cpulimit ....
Apr
29
comment Modifying PATH does not work
Have you tried adding export to .profile as well?
Mar
17
comment Not able to change permission of a file to add +x
What are the permissions for the directory? Does dropbox support permissions at all?
Mar
11
comment Inserting variable into sed command in bash script
@Rafal: Just add the file path as the last argument, or redirect (pipe) it to the script. The -p switch loads the file automatically.