Skip to content
Advertisement

Tag: shell

bash scripting, handling spaces in filesnames in a for loop strange behaviour

help. everything i’ve tried has failed. I’m trying to fix up my video collection and lots of them have spaces in the names/etc I want to transcode them and I’ve written the script below, but its failing. 2 of the filenames I’m using for testing are “13 Eerie (2013).avi” and “Ace.Ventura.When.Nature.Calls.1995.720p.WEB-DL.x264-mSD.mkv” i have tried several things from using print0 on

How can I control the number of running processes?

I’m doing a shell script and the unknown situation occurred. I must execute a certain number of processes, lets suppose 12. But I want to limit the executions by ‘t’ each time. So if ‘t’ is 3 I would have to execute 3 processes then 3, 3 and finally 3. But I would like to do it automatically, so I

zsh option to generate the recomended options

There is a nice option when setting up zsh on Ubuntu However, on a fresh Arch Linux install the option is missing. Is there a way to have it (or maybe, I am being picky here) ? Answer This happens when you haven’t got a .zshrc and there’s a /etc/zsh/recommended.zshrc. If you say yes, it’ll just copy that one to

using watch , tail and ccze together

I have used watch and tail together like this: Also I have used tail and ccze for colorizing log file as below: But I dont know how should I use all of these three together in a single command. Does any one have any idea? Answer Recent versions of watch has -c | –color option, so perhaps this will work

Delete a single line from a file with a unix shell script

I’m working with a simple shell script that needs to delete a single line from a file if a string entered at command line is found. Instead it deletes the entire contents of the file. the data file is like this(each entry is on a new line): my code: Answer N means the line number , begin from 1

Advertisement