"let" in BASH


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting "let" in BASH
Prev   Next
# 1  
Old 08-30-2014
Linux "let" in BASH

Hello everybody here..

Should I use "let" command in BASH? Why its not that rarely used in BASH examples and books?

Thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. Shell Programming and Scripting

Explaining behaviour of sudo bash "$0" "$@";

I've found this script part on the stackoverflow: if ; then sudo bash "$0" "$@"; exit "$?"; fi I realized that sudo bash "$0" "$@"; is the only needed for me. But the strange thing happens when I move this line outside the IF statement: sudo bash "$0" "$@"; stops the... (9 Replies)
Discussion started by: boqsc
9 Replies

4. Shell Programming and Scripting

Mindboggling difference between using "tee" and "/usr/bin/tee" in bash

I'm on Ubuntu 14.04 and I manually updated my coreutils so that "tee" is now on version 8.27 I was running a script using bash where there is some write to pipe error at some point causing the tee command to exit abruptly while the script continues to run. The newer version of tee seems to prevent... (2 Replies)
Discussion started by: stompadon
2 Replies

5. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

6. UNIX for Dummies Questions & Answers

"Help with bash script" - "License Server and Patch Updates"

Hi All, I'm completely new to bash scripting and still learning my way through albeit vey slowly. I need to know where to insert my server names', my ip address numbers through out the script alas to no avail. I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Shell Programming and Scripting

Simplify Bash Script Using "sed" Or "awk"

Input file: 2 aux003.net3.com error12 6 awn0117.net1.com error13 84 aux008 error14 29 aux001.ha.ux.isd.com error12 209 aux002.vm.ux.isd.com error34 21 alx0027.vm.net2.com error12 227 dux001.net5.com error123 22 us008.dot.net2.com error121 13 us009.net2.com error129Expected Output: 2... (4 Replies)
Discussion started by: sQew
4 Replies

9. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question
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)