Top "Shell" questions

The term 'shell' refers to a general class of text-based interactive command interpreters most often associated with the Unix & Linux operating systems.

Open and write data to text file using Bash?

How can I write data to a text file automatically by shell scripting in Linux? I was able to open …

bash shell
Redirect stderr and stdout in Bash

I want to redirect both stdout and stderr of a process to a single file. How do I do that …

bash shell stdout io-redirection stderr
Find and replace in file and overwrite file doesn't work, it empties the file

I would like to run a find and replace on an HTML file through the command line. My command looks …

shell unix sed io-redirection
How do I test if a variable is a number in Bash?

I just can't figure out how do I make sure an argument passed to my script is a number or …

linux bash shell
Get current directory name (without full path) in a Bash script

How would I get just the current working directory name in a bash script, or even better, just a terminal …

bash shell
How to run the sftp command with a password from Bash script?

I need to transfer a log file to a remote host using sftp from a Linux host. I have been …

bash shell unix ssh sftp
Use grep --exclude/--include syntax to not grep through certain files

I'm looking for the string foo= in text files in a directory tree. It's on a common Linux machine, I …

unix search shell command-line grep
Why I can't change directories using "cd"?

I'm trying to write a small script to change the current directory to my project directory: #!/bin/bash cd /home/…

shell
How to create a link to a directory

How to create a link xxx to /home/jake/doc/test/2000/something/? Assume the xxx is created under /home/jake …

linux shell command
Using curl to upload POST data with files

I would like to use cURL to not only send data parameters in HTTP POST but to also upload files …

shell file curl post file-upload