Search Results

Search: Posts Made By: popeye
8,332
Posted By popeye
thanks ..
thanks ..
8,332
Posted By popeye
Bash : Parameter expansion ${var:-file*}
Example data

$ ls *somehost*
10.10.10.10_somehost1.xyz.com.log
11.11.11.11_somehost2.xyz.com.log



#!/bin/bash
#FILES="*.log"
FILES=${FILES:-*.log}

for x in $FILES
do
ip="${x%%_*}"...
Showing results 1 to 2 of 2

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