Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Best Alternative for checking input parameter contains required value or not

$
0
0
Any good way to check if code has the required output

Code:

# /sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1

Code:

/sbin/sysctl net.ipv4.icmp_echo_ignore_broadcasts | grep "= 1"
net.ipv4.icmp_echo_ignore_broadcasts = 1

What I can think of is above, and it display the required output.
What I want to do is that it will display 'T' if it has and value return and 'F' if no return.

Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images