Tag Archives: if

In Linux shell script, about the commonly used flag [- EQ, GT..] in test and if judgment

1. Determine the “document type” of a document, such as test-e filename whether it exists or not

-e Whether the “Document” exists (commonly used)

-f whether the “Document” exists and is a file (commonly used)

-d whether this “document” exists and is a directory (commonly used)

-b Whether the Document exists and is a Block Device

-c Whether this Document exists and is a Character Device

-s whether this “document” exists and is a Socket file

-p Whether the “Document” exists and is a FIFO (PIPE) file

-l Whether the Document exists and is a link file


-r checks if the document exists and has “readable” permissions

-w checks if the document exists and has the permission to be writable

-x checks if the document exists and has “executable” permissions

-u checks if the document name exists and has the property “SUID”

-g checks if the document name exists and has the attribute “SGID”

-k checks if the document name exists and has a “Sticky bit” property

-s checks if the document exists and is a “non-blank file”

>
>
>
>
>
>
>
>

-nt (newer than) determines whether file1 is newer than file2

-ot (older than) determines whether file1 is older than file2

-ef determines whether file1 and file2 are the same file, which can be used to determine the hard link. The key is to determine if both files point to the same inode

4. About the comparison between two integers, for example test n1 -eq n2

-Eq equals two values.

-Ne is not equal.

-gt n1 is greater than n2 (greater than)

-lt n1 is less than n2 (less than)

-e e n1 is greater than or equal to n2 (greater than or equal)

-le n1 is less than or equal to n2.

5

The test-z string determines if the string is empty and returns true for empty

Test-n string determines that the string is not null and returns false for null

= test -r filename -a-x filename
= test -r filename -a-x filename

– A (and) is both true! Test-r file-a-x file = test-r file-a-x file = test-r file-a-x file = test-r file-a-x file = test-r file-a-x file = test-r file-a-x file = test-r file-a-x file

-O (OR) Either is true! Test-r file-o-x file = test-r file-o-x file = test-r file-o-x file = test-r file-o-x file = test-r file-o-x file = test-r file-o-x file = test-r file-o-x file

! Inverse state, such as test! -x file. Returns true if file does not have x

About writing [if] and [else] statements in JSP, Syntax error on token “else”, delete this token

A article is reproduced here: https://blog.csdn.net/sinat_37062120/article/details/79208949
Insert Java code into the JSP

<%if (***)%>
<%=***%>
<%else %>
<%=***%>

Error in the “else” in the third line
Syntax error on token “else”, delete this token

else must be followed by if. This error indicates that if
solution is not found:
add parentheses. Note that the “} “of if must be written inside the” else”

<%if (***) {%>
<%=***%>
<%} else {%>
<%=***%>
<%}%>

 

modelsim actually error loading design?

After a semester of EDA courses, I finally unloaded the ModelSim five times.

I believe that many students have encountered such problems when using ModelSim. Even though every design file has been compiled, the following sentence still appears:
Error loading design.
And then… There’s no then, there’s no hint.

At this point, you may need to do the following:
1. Check whether the file is not included and not added to the project.
2. Check that the port declaration of the design file is consistent with the port when instantiated.
3. Check that the module name of the design file is the same as the module name when instantiated.
4. Check if the port that has not been modified in the top-level file is wire (it has been poked for two weeks).
Ask your teacher or boss for help.

Virgin paste, please forgive me.
Uncle Huang in 2018.6.19 17:06

License Error: “Failed to Open the TCP Port Number in the License” Ultimate Solution

Why is it called the ultimate solution?Not to boast, this list is more complete than the current Synopsys, Cadence, support documentation, and FLEXnet’s help documentation.

these moves most of the eda vendor’s engineers are not plenary, the true conclusion is not nonsense. This thing toss about for a long time, spent a lot of energy, let me blow brag, ha ha.

in addition, if the following problems are excluded and the license is reported incorrectly, do not suspect that the list is incomplete, 99% of the time it may be that one of the steps is not done completely. Get a new check.

is limited to the legal license, crack is a weird problem, not to be discussed

start of text:

1, ensure that the LMGRD process has been completely killed;

# killall LMGRD

2, make sure the tool processes in the license, like synopsys SNPSLMD, cadence CDSLMD, are also completely killed

# killall XXXX

above two steps than lmdown-c license.lic insurance, also can be used cross-over

3, check whether the license port is used, if this is the case, you can temporarily change the port to try to start it once, if it is successful to explain the problem, follow the steps below to change back to the actual use of port

# netstat -pan | grep port_number

gets the process that is using the port, kill it, if not, wait for the port to be released, which may take a few minutes.

4, make sure the TCP protocol is started

can ping the host name view, can ping no problem

5, make sure the firewall does not block this port or turn off iptables

#service iptables stop

6, view seLinux or close

#setenforce 0

7, check /etc/hosts to make sure you have this line

127.0.0.1 localhost

8, check to see if Telnet hostname can pass, if it can’t login, then change by the following way

1 & gt; Install Telnet, Telnet-Server, xinetd
2 & gt; Modify /etc/xinetd.d/ Telnet disable to no
3 & gt; /etc/init.d/xinetd restart

9, if you use nis, make sure that the first parameter of all items in /etc/nsswitch is files

For example, networks: nisplus [NOTFOUND=return] files should be changed to
networks: files [NOTFOUND=return] nisplus

more than one problem usually do not encounter all at once, from front to back to find which solution to the problem can be.

is limited to the legal license, crack is a weird problem, not to be discussed