Results 1 to 3 of 3
Thread: Bash script
Hybrid View
-
10th November 2013 20:58 #1
Bash script
. Bash Shell, if-statement.
.txt ping 100 . []PING[] 2- , []time=[] 7- , (). , cut statement- true false. :Code:#!/bin/bash while read line do if [[ "$line" == *PING* ]] then cut -d ' ' -f 2 elif [[ "$line" == *time=* ]] then cut -d ' ' -f 7 fi done
, .. if-statement-. cut awk cut/awk true false.Code:#!/bin/bash while read line do if [[ "$line" == *PING* ]] then echo "TRUE" elif [[ "$line" == *time=* ]] then echo "FALSE" fi done
?NZXT H1 | Ryzen 7 5800X | Asus Strix B450i | 16GB Corsair Vengeance DDR4-3200 | Inno3D GeForce RTX 4070Ti X3 12GB | 1TB PNY XLR8 M.2 NVMe SSD
-
11th November 2013 00:31 #2
, - cut -f 7 7 .
, - cut stdin. while stdin ( stdin ), , .. HWBG !
-
11th November 2013 21:19 #3
, loop if-statement, /
NZXT H1 | Ryzen 7 5800X | Asus Strix B450i | 16GB Corsair Vengeance DDR4-3200 | Inno3D GeForce RTX 4070Ti X3 12GB | 1TB PNY XLR8 M.2 NVMe SSD




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in