Pages

Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts

2008-12-10

BASH Shell: For Loop File Names With Spaces

"BASH for loop works nicely under UNIX / Linux / Windows and OS X while working on set of files. However, if you try to process a for loop on file name with spaces in them you are going to have some problem. for loop uses $IFS variable to determine what the field separators are. By default $IFS is set to the space character. There are multiple solutions to this problem."

http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html

2008-12-09

fold: Wrap Text File / Line / Words To Fit in Specified Width

"fold is really nifty command line utility to make a text file word wrap. This is useful for large number of text files processing. There is no need to write a perl / python code or use a word processor."

http://www.cyberciti.biz/tips/linux-unix-word-wrap-command.html

"For example, following command will wrap input.txt at 60 width columns:

$ fold -sw 60 input.txt > output.txt
"

2008-07-16

Shell Games - Windows Powershell and Bash

"Microsoft’s new PowerShell relies on .NET framework libraries and thus has access to a treasure trove of functions and objects. How does PowerShell measure up to traditional shells like Bash?"

http://linux-magazine.com/issues/2007/78/shell_games/(kategorie)/0

2008-06-09

Goosh - the unofficial google shell.

"This google-interface behaves similar to a unix-shell.
You type commands and the results are shown on this page."

http://goosh.org/

2008-05-18

Getting started with awk

"This qref is written for a semi-knowledgable UNIX user who has just come up against a problem and has been advised to use awk to solve it. Perhaps one of the examples can be quickly modified for immediate use."

http://doc.ddart.net/shell/awk/

2008-04-30

Linux Command Reference / Linux Tips

"This is a linux command line reference for common operations.
Examples marked with • are valid/safe to paste without modification into a terminal, so
you may want to keep a terminal window open while reading this so you can cut & paste."

http://www.pixelbeat.org/cmdline.html


"Linux is so powerful because it contains hundreds of useful tools that can be combined in a practically infinite number of ways to get the job done. But it can be hard to remember every switch of every command, especially if it is a command that is used infrequently. These Linux Tips pages help me remember the most useful incantations. They are published here in case anyone else finds them useful."

http://www.robfisher.net/linuxtips/

Getting Started with BASH / BASH Programming - Introduction HOW-TO

"The GNU Bourne-Again SHell (BASH) incorporates features from the C Shell (csh) and the Korn Shell (ksh) and conforms to the POSTIX 2 shell specifications. It provides a Command Line Interface (CLI) for working on *nix systems and is the most common shell used on Linux systems. Useful bash features will be the subject of the rest of this document."

http://www.hypexr.org/bash_tutorial.php



"This article intends to help you to start programming basic-intermediate shell scripts. It does not intend to be an advanced document (see the title). I am NOT an expert nor guru shell programmer. I decided to write this because I'll learn a lot and it might be useful to other people. Any feedback will be appreciated, specially in the patch form :)"

http://www.faqs.org/docs/Linux-HOWTO/Bash-Prog-Intro-HOWTO.html

Bourne shell idioms

"Here are some portable Bourne shell idioms that I find useful to remember for scripting. The Bourne shell does much more than most users realize, and the ksh and bash extensions are rarely essential. (From the command-line, bash and ksh are vastly more useful.)"

http://billharlan.com/pub/papers/Bourne_shell_idioms.html

For example

"
Loop over the elements of a PATH by tokenizing with the character ':'.
IFS=':' ; for dir in $PATH ; do echo $dir ; done
"

2008-03-17

Rename multiple files with Linux

"Different ways to rename bulk files in Linux, using mv and rename

We are going to explore different ways to change names of multiple files using command line of Linux Operating System.

We are going to use rename which is a perl script, and also the know mv, together with for, in "one-line" shell script"

http://www.go2linux.org/rename-bulk-files-with-linux-console-command

2008-02-03

How to write a shell script

" A shell is a command line interpretor. It takes commands and executes them. As such, it implements a programming language. The Bourne shell is used to create shell scripts -- ie. programs that are interpreted/executed by the shell."

http://www.hsrl.rutgers.edu/ug/shell_help.html

2007-12-06

Bash scripting Tutorial

This bash tutorial assumes no previous knowledge of bash scripting.As you will soon discover in this quick comprehensive bash scripting guide, learning the bash shell scripting is very easy task.

http://www.linuxconfig.org/Bash_scripting_Tutorial