Linux add user with no shell access

Bash
With this command you can create an user with no shell access.
2 years ago

How to enable python repl autocomplete and still allow new line tabs

Bash
I currently have the following in ~/.pythonrc to enable auto completion in the python repl:# Autocompletionimport rlcompleter, readlinereadline.parse_...
1 year ago

In UNIX shell scripting: What does $! expand to?

Bash
What is the meaning for $! in shell or shell scripting? I am trying to understand a script which has the something like the following.local@usr> a=...
1 year ago

Execute zgrep command and write results to a file

Bash
I have a folder containing lots of files like file_1.gz to file_250.gz and increasing. A zgrep command which searches through them is like: zgrep -...
1 year ago

Why does `rm -i kk kk*` complain about a missing kk?

Bash
Well i want to understand how rm command works, What i tried: touch kk kk.999 (so it creates 2 blank files the kk and the kk.999) rm -i kk kk* (then...
1 year ago

how to create a while do done script that has an exit and continue option?

Bash
I am trying to figure out how to create a while-do-done script in bash that will allow me to select options 1-4 and if I do use 1-4 will allow me to m...
1 year ago

How do I put an already-running process under nohup?

Bash
I have a process that is already running for a long time and don't want to end it. How do I put it under nohup (that is, how do I cause it to continu...
1 year ago

Boot to shell with Ubuntu MATE 15.04 on Raspberry PI 2

Bash
Is it possible to boot to the terminal? I've tried to look for a grub file but I could not find it. Also /boot/firmware/config.txt does not seem to ha...
1 year ago

Bash tries to execute commands in heredoc

Bash
I am trying to write a simple bash script that will print a multiline output to another file. I am doing it through heredoc format: #!/bin/sh echo "...
1 year ago

Trouble Automating Linux (Specifically Raspbian) Scripts

Bash
I've been experimenting with Pis for a little while now and am close to completing my first project, I have all the bits working but I'm struggling to...
1 year ago

OS X Terminal Colors

Bash
I'm new to OS X, having just gotten a Mac after working with Ubuntu Linux for some time. Among the many things I'm trying to figure out is the absence...
1 year ago

Watch a file for change

Bash
I want to watch any changes to a file xyz.txt and email me the entire file whenever there is a change. Is there One Liner (or a few lines shell script...
1 year ago

Using BASH to display a progress (working) indicator

Bash
Using a bash only script, how can you provide a bash progress indicator? So I can run a command form bash, and while that command is executing let th...
1 year ago

Python: Get a list of changed files between two commits or branches

Bash
I'm a Python/Git newb but I'm trying to write a script that takes two branches or commits as parameters and shows a list of changed files between the ...
1 year ago

bash double bracket issue

Bash
I'm very new to bash scripting and am running into an issue when using double brackets. I can't seem to get them to work at all in Ubuntu Server 11.10...
1 year ago

Passing arguments to a script invoked with bash -c

Bash
I'm testing a Bash script I created on GitHub for behavioral correctness (e.g. that it parses options correctly). I want to do this without having to ...
1 year ago

self-deleting shell script

Bash
I've looked around for an answer to this one but couldn't find one. I have written a simple script that does initial server settings and I'd like it ...
1 year ago

What is happening behind the scenes for these basic Unix commands?

Bash
I was just playing with some basic Unix commands with following operations create a file 'one' create a link 'two' to 'one' (ln one two) Edit the fi...
1 year ago

Replacing strings between two patterns with sed

Bash
Example: This (word1) is a test (word2) file. What I want: This is a test file. The problem is that the brackets occur more than once, so if I u...
1 year ago

Multiple lazy string replacing between two patterns with sed

Bash
Example: This (word1) is a test (word2) file. What I want: This is a test file. The problem is that the brackets occur more than once, so if I u...
1 year ago