Category "shell"

Binding option left and right arrows to move by words in zsh command line

I'm using iTerm2 on Mac OSX 10.8 with an xterm key binding and zsh. I'd like zsh to use option left arrow and option right arrow to do the standard Mac binding

Difference between sh and Bash

When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know what's the difference between them. What's main difference

Running shell script in parallel

I have a shell script which shuffles a large text file (6 million rows and 6 columns) sorts the file based the first column outputs 1000 files So the pseu

Bash command line and input limit

Is there some sort of character limit imposed in bash (or other shells) for how long an input can be? If so, what is that character limit? I.e. Is it possible

How can I parse a YAML file from a Linux shell script?

I wish to provide a structured configuration file which is as easy as possible for a non-technical user to edit (unfortunately it has to be a file) and so I wan

Problem with passing parameters in a shell function

I have the following shell script. There is a deploy function, that is used later in the script to deploy containers. function deploy { if [[ $4 -eq QA ]]

bash script to check if the current git branch = "x"

I am very bad at shell scripting (with bash), I am looking for a way to check if the current git branch is "x", and abort the script if it is not "x". #!/

android enable disable bluetooth via command line

I am trying to enable disable bluetooth on android device using command line. I can enable it using adb shell am start -a android.bluetooth.adapter.action.RE

Backspace in zsh fails to work in quite the strange way

I'm on a fresh Virtualbox install of CentOS 6.4. After installing zsh 5.0.2 from source using ./configure --prefix=/usr && make && make install

Delphi notification when a file gets updated

My app contains documents in its database. The users can open the documents in which case, the document gets saved to a temporary folder and gets opened on the

Is it possible to use output redirections from a cmd file using start?

I want to have a cmd file with something like: :one start /wait (blabla1.exe -q -m 1>blabla1.log 2>&1) :two start /wait (blabla2.exe -q -m 1>bl

How to fix “No newline at end of file” warning for lots of files?

I have a huge number of source files that are all lacking a newline at the end. How do I automatically add a newline to the end of each of them? Some may alre

How to fix “No newline at end of file” warning for lots of files?

I have a huge number of source files that are all lacking a newline at the end. How do I automatically add a newline to the end of each of them? Some may alre

How to use crontab in Android?

I can't find answer to my question: Is it possible to run crontab to reboot Android using busybox (or other means) Tried to run crontab, and it complain about

find: missing argument to -exec

I was helped out today with a command, but it doesn't seem to be working. This is the command: find /home/me/download/ -type f -name "*.rm" -exec ffmpeg -i {}

Find multiple files and rename them in Linux

I am having files like a_dbg.txt, b_dbg.txt ... in a Suse 10 system. I want to write a bash shell script which should rename these files by removing "_dbg" from

hex code implementation for spawning a shell

I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture:

hex code implementation for spawning a shell

I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture:

hex code implementation for spawning a shell

I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture: