Sponsored Content
Full Discussion: Unix Scripting
Top Forums Shell Programming and Scripting Unix Scripting Post 302342091 by chihung on Friday 7th of August 2009 11:05:43 AM
Old 08-07-2009
I used to think that learning Bourne shell (sh) is the most portable and safest in scripting writing. That may be true in the past. Nowadays, I hardly see UNIX system without ksh or even bash shell. In some situations, you will find Bourne shell is pretty inefficient because one has to rely on external commands to achieve certain actions. Spawning process is considered very experience. Imagine you need to spawn processes in a few thousand times. ksh and bash have special syntax to help to achieve common tasks without spawning.

As for Perl or Python ? It is really up to one's taste. IMO, it is not about the language, it is all about how clear you can use the language to do the work. If a language can last that long, it definitely has some value.

Both Perl and Python have a lot of libraries and utilities available on the web, no need to reinvent the wheel. However, if you always depend on this, you will not be able to invent your own wheel.

Shell scripting intro is a good intro, IMO

Last edited by chihung; 08-07-2009 at 12:10 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX Scripting

:confused: I need to find a place or places on the Internet where I can find UNIX scripts to view and to modify to make life easy on the UNIX environment. Can someone help me on this. Thanks (7 Replies)
Discussion started by: wolf
7 Replies

2. UNIX for Dummies Questions & Answers

Help With Unix Scripting.

Can anybody tell me the best way to learn unix scripting.can you recommend a good book.Please help! (1 Reply)
Discussion started by: hella
1 Replies

3. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

4. UNIX for Dummies Questions & Answers

Unix scripting pl help

Hi All, I am new to Unix Scripting. I have below scenario. I need to write a Unix function with the following. 1. I have table. From this table I need to write a query. SELECT Col1(File_nm),Col2(From_Loc),Col3(To_Loc) FROM A WHERE CONDITION For... (1 Reply)
Discussion started by: sree11
1 Replies

5. UNIX for Dummies Questions & Answers

Help me Out in unix scripting

Hello every one, plz help me out. I m using 4 files in unix, like file1, file2, file3,file4 in which primary key is ID in column(field) of 4 files. On the bases of ID, i want the corresponding field of 4 files in final file let say collected file. In collected file, ID column should occur only one... (16 Replies)
Discussion started by: kaprus
16 Replies

6. UNIX for Dummies Questions & Answers

Unix Scripting

Hi Gurus, I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (1 Reply)
Discussion started by: madanmeer
1 Replies

7. Shell Programming and Scripting

Unix scripting

how to check if a unix script gets executed without errors across all unix platforms. incase if a script gets executed without errors only one platform say AIX, what needs to be done to that script such that it will run all unix platforms like linux, hp, sun etc (2 Replies)
Discussion started by: rmann
2 Replies

8. UNIX for Advanced & Expert Users

Unix scripting

i need help with this problem this is the problem: Write a script that logs how many users login on/off the system over a 5 minute period. It can run in the foreground, and run 4 times a minute. Set a trap that will not allow a CNTRL-C command, and if a CNTRL-C is excuted store the time and date... (1 Reply)
Discussion started by: sportsmansixty6
1 Replies

9. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies

10. Shell Programming and Scripting

UNIX scripting

LIST=/home/xxxxxxx/ABC/xeeno_scrpts/temp/tempfile ERRORDIR=/home/xxxxxxx/ABC/error_directory EMAILFILE=/home/xxxxxxx/ABC/xeeno_scrpts/temp/emailfile echo "There were errors in the following report file for Xeenos:" > $EMAILFILE echo >> $EMAILFILE echo "This files have been moved to... (9 Replies)
Discussion started by: bcarosi
9 Replies
LKSH(1) 						    BSD General Commands Manual 						   LKSH(1)

NAME
lksh -- Legacy Korn shell built on mksh SYNOPSIS
lksh [-+abCefhiklmnprUuvXx] [-+o opt] [-c string | -s | file [args ...]] DESCRIPTION
lksh is a command interpreter intended exclusive for running legacy shell scripts. It is built on mksh; refer to its manual page for details on the scripting language. LEGACY MODE
lksh has the following differences from mksh: o lksh is not suitable for use as /bin/sh. o There is no explicit support for interactive use, nor any command line editing code. Hence, lksh is not suitable as a user's login shell, either; use mksh instead. o The KSH_VERSION string identifies lksh as ``LEGACY KSH'' instead of ``MIRBSD KSH''. o Some mksh specific extensions are missing; specifically, the -T command-line option. o lksh always uses traditional mode for constructs like: $ set -- $(getopt ab:c "$@") $ echo $? POSIX mandates this to show 0, but traditional mode passes through the errorlevel from the getopt(1) command. o lksh, unlike AT&T UNIX ksh, does not keep file descriptors > 2 private. o lksh parses leading-zero numbers as octal (base 8). o Integers use the host C environment's long type, not int32_t. Unsigned arithmetic is done using unsigned long, not uint32_t. Neither value limits nor wraparound is guaranteed. Dividing the largest negative number by -1 is Undefined Behaviour (but might work on 32-bit and 64-bit long types). o lksh only offers the traditional ten file descriptors to scripts. SEE ALSO
mksh(1) https://www.mirbsd.org/mksh.htm https://www.mirbsd.org/ksh-chan.htm CAVEATS
lksh tries to make a cross between a legacy bourne/posix compatibl-ish shell and a legacy pdksh-alike but ``legacy'' is not exactly speci- fied. Parsing numbers with leading zero digits or ``0x'' is relatively recent in all pdksh derivates, but supported here for completeness. It might make sense to make this a run-time option, but that might also be overkill. The set built-in command does not have all options one would expect from a full-blown mksh or pdksh. Talk to the MirOS development team using the mailing list at <miros-mksh@mirbsd.org> or the #!/bin/mksh (or #ksh) IRC channel at irc.freenode.net (Port 6697 SSL, 6667 unencrypted) if you need any further quirks or assistance, and consider migrating your legacy scripts to work with mksh instead of requiring lksh. MirBSD February 11, 2013 MirBSD
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy