UNIX

TwitterFacebook
Get flash to fully experience Pearltrees
SCP

Bash

One often-overlooked feature of Bourne shell script programming is that you can easily write functions for use within your script. This is generally done in one of two ways; with a simple script, the function is simply declared in the same file as it is called. However, when writing a suite of scripts, it is often easier to write a "library" of useful functions, and source that file at the start of the other scripts which use the functions. This will be shown later . http://steve-parker.org/sh/functions.shtml#exit

Bourne / Bash shell scripting tutorial - Functions

Q. How do I format date to display on screen on for my scripts as per my requirements? A. http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/

How to format date for display or to use in a shell script

UNIX / Linux Bourne / Bash Shell Scripting Tutorial [ steve-parker.org ]

http://steve-parker.org/sh/exitcodes.shtml Exit codes are a number between 0 and 256, which is returned by any Unix command when it returns control to its parent process. Other numbers can be used, but these are treated modulo 256, so exit -10 is equivalent to exit 246 , and exit 257 is equivalent to exit 1 . These can be used within a shell script to change the flow of execution depending on the success or failure of commands executed. This was briefly introduced in Variables - Part II . Here we shall look in more detail in the available interpretations of exit codes.

UNIX / Linux Bourne / Bash Shell Scripting Tutorial [ steve-parker.org ]

http://steve-parker.org/sh/speedtouchconf.shtml This is a script I maintain which is used to configure an Alcatel SpeedTouch Modem. If you actually want to use the script, go to http://speedtouchconf.sourceforge.net/ . This page is just about documenting it, and showing good and bad styles in coding. Note that the code is <PRE> formatted, so you may need to scroll left and right in your browser to see the comments, depending on your screen resolution and font sizes.

UNIX Shell Script Tutorials &amp; Reference

http://www.injunea.demon.co.uk/pages/page204.htm The next few sections are all based on the syntax rules for the Bourne shell as listed in the man pages for sh from my system. Compare these rules with those of your system. There may be slight differences where the specification of the sh is loosely defined.
Why Use Shells? Well, most likely because the are a simple way to string together a bunch of UNIX commands for execution at any time without the need for prior compilation. Also because its generally fast to get a script going.

UNIX Shell Script Tutorials &amp; Reference

http://www.injunea.demon.co.uk/pages/page203.htm
http://www.oracle.com/us/sun/index.htm Oracle acquired Sun in 2010, and since that time Oracle's hardware and software engineers have worked side-by-side to build fully integrated systems and optimized solutions designed to achieve performance levels that are unmatched in the industry. Early examples include the Oracle Exadata Database Machine X2-8 , and the first Oracle Exalogic Elastic Cloud , both introduced in late 2010. During 2011, Oracle introduced the SPARC SuperCluster T4-4 , a general-purpose, engineered system with Oracle Solaris that delivered record-breaking performance on a series of enterprise benchmarks. Oracle's SPARC-based systems are some of the most scalable, reliable, and secure products available today.

BigAdmin Shell Commands

http://www.softpanorama.org/Tools/Find/find_examples.shtml Print all files with the given extension: find . -name "*.c" -type f -print find /usr/local -name "*.html" -type f -print Print all file that exceed a certain size and were modified long ago (to clear some space): find / -size +1000 -mtime +30 -exec ls -l {} \; To report all files starting in the directories "/mydir1" and "/mydir2" larger than 2000 blocks (about 1000K) AND that have not been accessed in over 30 days, enter: find /mydir1 /mydir2 -size +2000 -atime +30 -print Removes unnecessary files that are older than two weeks old, but doesn't descend NFS mounted file systems while searching:

Examples of Usage of Unix Find Command

Unix File Finding Commands.Find File Shell Script. Search File Unix ...

Following are some bunch of commands that might be useful if you want to find files in unix/linux. Large Files Find files larger than 10MB in the current directory downwards… find . http://viralpatel.net/blogs/some-useful-unix-file-finding-commands/

Bash While Loop Example

H ow do I use bash while loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using while statement? The bash while loop is a control flow statement that allows code or commands to be executed repeatedly based on a given condition. http://www.cyberciti.biz/faq/bash-while-loop/

Bourne shell script need help please ? by dezithug - UNIX for Advanced ...

Well, first off, it helped me a lot to look at the code with indents in it: Code: #!/bin/ksh count=1 val=$2 op=$1 ans=0 if [ $op = "-e" -o $op = "-o" ] then if [ $op = "-e" ] then while [ $count -le $val ] do ans=`expr $count % 2` if [ $ans -eq 0 ] then echo "$count \c " count=`expr $count + 1` fi done elif [ $op = "-o" ] then while [ $count -le $val ] do ans=`expr $count % 2` if [ $ans -ne 0 ] then echo "$count \c " count=`expr $count + 1` fi done fi else while [ $count -le $val ] do echo "$count \c " count=`expr $count + 1` done fi
by Mike G mikkey at dynamo.com.ar Thu Jul 27 09:36:18 ART 2000 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.

BASH Programming - Introduction HOW-TO

Oracle Oracle Technology Network > Java Article

Shell Programming Techniques

Bash Shell Loop Over Set of Files

H ow do I run shell loop over set of files stored in a current directory or specified directory? You can use for loop easily over a set of shell file under bash or any other UNIX shell using wild card character. Syntax The general syntax is as follows: for f in file1 file2 file3 file5 do echo "Processing $f" # do something on $f done You can also use shell variables: