What does -gt operator mean in Bash programming

0 votes

I was reading some code, but I could not understand one thing.

What does -gt mean in the following code?

if [ $result -gt 0 ] ;
then
    exit 1 ;
fi
Jun 20 in Linux Administration by Korak
• 5,820 points
13 views

1 answer to this question.

0 votes

It's a math test. assist with testing tells:

  arg1 OP arg2 Arithmetic tests. Over powered is one of - eq, - ne,
                 -lt, - le, - gt, or - ge.
-gt is more noteworthy than.

In your model, the condition is valid assuming the variable outcome is more prominent than nothing.

answered Jun 20 by Rahul
• 3,380 points

Related Questions In Linux Administration

0 votes
1 answer

What does -f mean in bash

Luckily, the Bash Reference Manual is accessible ...READ MORE

answered Jun 10 in Linux Administration by Korak
• 5,820 points
6 views
0 votes
0 answers

What does the $ mean in Linux?

I have to explain what the code ...READ MORE

Apr 13 in Linux Administration by Soham
• 8,730 points
45 views
+1 vote
2 answers

What does file permission 755 mean?

Hi, File permission 755 means that the directory ...READ MORE

answered Dec 9, 2020 in Linux Administration by MD
• 95,360 points
164,614 views
0 votes
0 answers

What exactly does the Unix `bash` command do when run without options?

When you type bash into the terminal ...READ MORE

Apr 14 in Linux Administration by Soham
• 8,730 points
21 views
0 votes
0 answers

What does "&" at the end of a linux command mean?

I am a system administrator and I ...READ MORE

Apr 21 in Linux Administration by Edureka
• 13,640 points
21 views
0 votes
1 answer

What does “sudo echo nameserver 8.8.8.8 > /etc/resolv.conf” do?

If executing this command resolved your issue ...READ MORE

answered Jan 23, 2019 in Linux Administration by joey
2,019 views
0 votes
1 answer

How to take input from user in bash script?

You can use if-else branch to check ...READ MORE

answered Jan 31, 2019 in Linux Administration by Omkar
• 69,210 points
441 views
0 votes
1 answer

What is absolute path in Ubuntu?

An absolute path is a path to ...READ MORE

answered Feb 9, 2019 in Linux Administration by Omkar
• 69,210 points
551 views
0 votes
1 answer

Why do you need to put #!/bin/bash at the beginning of a script file?

It's a show so the *nix shell ...READ MORE

answered Jun 20 in Linux Administration by Rahul
• 3,380 points
13 views
0 votes
1 answer

bash : Bad Substitution

The default shell (/bin/sh) under Ubuntu focuses ...READ MORE

answered Jun 20 in Linux Administration by Rahul
• 3,380 points
17 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP