Search Results

Search: Posts Made By: paulobrad
12,940
Posted By paulobrad
Adding options to a shell script
I want to add options to my shell script but having problems, my code so far is;


#!/bin/bash
lflag=
iflag=
while getopts 'l:i:' OPTION
do
case...
26,214
Posted By paulobrad
Pattern matching in a shell script?
I'm looking for a way to match a particular string in another string and if a match is found execute some command.

I found the case statement can be used like this;


case word in
[...
2,072
Posted By paulobrad
Swich statement based on a grep?
I'm piping the results of a tcpdump into a shell script and want certain commands executed (specifically the firing of an SNMP alert) based on a grep for certain contents in the output of tcpdump.
...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 07:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy