Sponsored Content
Full Discussion: BASH to KSH
Top Forums Shell Programming and Scripting BASH to KSH Post 302551393 by cvsanthosh on Tuesday 30th of August 2011 08:35:37 AM
Old 08-30-2011
Thanks for your reply. We need to change from BASH to KSH with in the same script. Reason being some of the environment related settings are done using BASH.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ksh vs Bash

Hi Buddy, Can any one help me to overcome from the below problem? #/usr/bin/ksh typeset -Z dd dd=1 echo $dd =========== out put for the above is 01 same script I'm migrating to bash but typeset -Z option is not found in bash, Pls get me the equivalent option in BASH Thanks in... (1 Reply)
Discussion started by: krishna
1 Replies

2. Shell Programming and Scripting

Need help : KSH>BASH

Hello, I've written a script in KSH, but now it needs to run on a system without KSH, ie sh or bash etc, bash seems best bet, but the simplest of things don't seem to work.. The snippet below is the main issue, basically I'm reading from a dat file and putting fields into arrays.. Dat file... (5 Replies)
Discussion started by: itsupplies
5 Replies

3. Shell Programming and Scripting

bash and ksh: variable lost in loop in bash?

Hi, I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh). The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies

4. Shell Programming and Scripting

ksh to bash mode

Hi guys... I have a ksh shell by default, so when I login to my unix box, all my .profile statements gets executed(including the aliases). But for some reasons(may be not comfortable using ksh), I would always switch to BASH(in the same session but as a child process) but in the process I am... (16 Replies)
Discussion started by: anduzzi
16 Replies

5. UNIX for Dummies Questions & Answers

Specified Ksh but executing in bash

Hi, I am a new bie to unix shell programming. I have specified ksh as the first line in my script but when executed it complains. *********** Script=test******************** #!/usr/bin/ksh echo hello print -p 123 ************************************ ++++++++ Execution... (7 Replies)
Discussion started by: akhilnagpal
7 Replies

6. Solaris

ksh vs bash

Hi, I've a general question regarding shell. I 've seen that every where i worked in production environment people are using ksh .. but i like to use .. bash .. is there any particular reason why hardcore sysadmins use ksh ? (8 Replies)
Discussion started by: fugitive
8 Replies

7. UNIX for Dummies Questions & Answers

bash preferred or ksh with bash features

I'm a user on a fairly locked down sys V server. By default, I have ksh set as my default shell. I added to my .profile: bash -o vi so when I login, it goes into bash so I can take advantage of tab completion and use the up key to bring up previous commands. However, whenever I want to exit, I... (2 Replies)
Discussion started by: mrwatkin
2 Replies

8. Shell Programming and Scripting

ksh vs bash

what is diff between KSH and Bash can you tell me some commands which run in either of two but not in both. while doing normal shell programming I am unable to find diffrence between two (2 Replies)
Discussion started by: pasricha.kunal
2 Replies

9. Shell Programming and Scripting

Bash to ksh problem

Hi all Below code works in bash but it is not working in ksh. enddate=`date -d "$enddate + $i day" "+%Y_%m_%d"` Please help me how it works in ksh Thanks (10 Replies)
Discussion started by: pmreddy
10 Replies

10. Shell Programming and Scripting

Changing from bash to ksh

Hello, I want to run a script written in ksh but my default shell is bash as root e.g in the script it has #!/bin/ksh i have gone into /etc/passwd to change it from :/bin/bash to /bin/ksh but still giving me an error when running scripts such as ./installer -bash: ./installer: /bin/ksh:... (3 Replies)
Discussion started by: DOkuwa
3 Replies
FIREHOL(1)						      General Commands Manual							FIREHOL(1)

NAME
firehol - An easy to use but powerful iptables stateful firewall SYNOPSIS
firehol start|try|stop|restart|condrestart|status|panic|save|debug|helpme firehol configfile [start|debug|try] firehol nothing DESCRIPTION
firehol is an iptables firewall generator producing stateful iptables packet filtering firewalls, on Linux hosts and routers with any num- ber of network interfaces, any number of routes, any number of services served, any number of complexity between variations of the services (including positive and negative expressions). firehol is a language to express firewalling rules, not just a script that produces some kind of a firewall. The goals of firehol are: o Being as easy as possible Independently of the security skills he/she has, firehol allows to create and understand complex firewalls in just a few seconds. The configuration files are very easy to type and read. o Being as secure as possible. By allowing explicitly only the wanted traffic to flow firehol secures your system. firehol produces stateful rules for any service or protocol, in both directions of the firewall. o Being as open as possible. Althoug firehol is pre-configured for a large number of services, you can configure any service you like and firehol will turn it into a client, a server, or a router. o Being as flexible as possible. firehol can be used by end users and guru administrators requiring extremely complex firewalls. firehol configuration files are BASH scripts; you can write in them anything BASH accepts, including variables, pipes, loops, conditions, calls to external programs, run other BASH scripts with firehol directives in them, etc. o Being as simple as possible. firehol is easy to install on any modern Linux system; only one file is required, no compilations involved. Options start Activates the firewall configuration. The configuration is expected to be found in /etc/firehol/firehol.conf. try Activates the firewall, but waits until the user types the word commit. If this word is not typed within 30 seconds, the previous firewall is restored. stop Stops a running iptables firewall by running /etc/init.d/iptables stop. This will allow all traffic to pass unchecked. restart This is an alias for start and is given for compatibility with /etc/init.d/iptables. condrestart Starts the firehol firewall only if it is not already active. It does not detect a modified configuration file, only verifies that firehol has been started in the past and not stopped yet. status Shows the running firewall, as in /sbin/iptables -nxvL | less panic It removes all rules from the running firewall and then it DROPs all traffic on all iptables tables (mangle, nat, filter) and pre- defined chains (PREROUTING, INPUT, FORWARD, OUTPUT, POSTROUTING), thus blocking all IP communication. DROPing is not done by changing the default policy to DROP, but by adding just one rule per table/chain to drop all traffic, because the default iptables scripts sup- plied by many systems (including RedHat 8) do not reset all the chains to ACCEPT when starting (firehol resets them correctly). When activating panic mode, firehol checks for the existance of the SSH_CLIENT shell environment variable (set by SSH). If it find this, then panic mode will allow the established SSH connection specified in this variable to operate. Notice that in order for this to work, you should have su without the minus (-) sign, since su - overwrites the shell variables and therefore the SSH_CLIENT variable is lost. Alternativelly, after the panic argument you can specify an IP address in which case all established connections between this IP address and the host in panic will be allowed. save Start the firewall and then save it using /sbin/iptables-save to /etc/sysconfig/iptables. Since v1.64, this is not implemented using /etc/init.d/iptables save because there is a bug in some versions of iptables-save that save invalid commands (! --uid-owner A is saved as --uid-owner !A) which cannot be restored. firehol fixes this problem (by saving it, and then replacing --uid-owner ! with ! --uid-owner). Note that not all firehol firewalls will work if restored with: /etc/init.d/iptables start because FireHOL handles kernel modules and might have queried RPC servers (used by the NFS service) before starting the firewall. Also, firehol automatically checks current ker- nel configuration for client ports range. If you restore a firewall using the iptables service your firewall may not work as expected. debug Parses the configuration file but instead of activating it, it shows the generated iptables statements. explain Enters an interactive mode where it accepts normal configuration commands and presents the generated iptables commands for each of them, together with some reasoning for its purpose. Additionally, it automatically generates a configuration script based on the suc- cessfull commands given. When in directive mode, firehol has the following special commands: o help Present some help o show Present the generated firehol configuration o quit Exit interactive mode and quit firehol helpme Tries to guess the firehol configuration needed for the current machine. firehol will not stop or alter the running firewall. The con- figuration file is given in the standard output of firehol, thus /etc/init.d/firehol helpme >/tmp/firehol.conf will produce the output in /tmp/firehol.conf. The generated firehol configuration should and must be edited before used on your systems. You are required to take many decisions and the comments of the generated file will instruct you for many of them. configfile A different configuration file. If no other argument is given, the configuration file will be tried (default = try). Otherwise the argument next to the filename can be one of start, debug, try. nothing Presents help about firehol usage. FILES
/etc/firehol/firehol.conf AUTHOR
firehol written by Costa Tsaousis <costa@tsaousis.gr>. Man page written by Marc Brockschmidt <marc@marcbrockschmidt.de>. SEE ALSO
firehol.conf(5), iptables(8), bash(1) 2003-04-30 FIREHOL(1)
All times are GMT -4. The time now is 03:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy