Migrating kornshell scripts from solaris 10 to RHEL 7.5  /bin/sh is used to execute shell scripts in RHEL 7.5  $ ls -l /bin/sh lrwxrwxrwx. 1 root root 4 Jul 16 12:10 /bin/sh -&gt; bash   So, we would like to first parse the complete code to verify their syntax  but not execute it,   For example:  sleep 20 echo test cd /a/b/c connect # instead of ./connect   should just parse the code but not execute it  What is the approach to just parse the code? to verify syntax without executing it.
Is it possible to check a bash script syntax without executing it?  Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts?
I recently received this rather amusing message while reviewing a user's first post:  Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author.   What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep? Array index out of bound behavior Why does C/C++ differentiates in case of array index out of bound #include &lt;stdio.h&gt; int main() {     int a[10];     a[3]=4;     a[11]=3;//does not give segmentation fault     a[25]=4;//does not give segmentation fault     a[20000]=3; //gives segmentation fault     return 0; }  I understand that it's trying to access memory allocated to process or thread in case of a[11] or a[25] and it's going out of stack bounds in case of a[20000]. Why doesn't compiler or linker give an error, aren't they aware of the array size? If not then how does sizeof(a) work correctly? BASH script to set environment variables not working I've written the following script to set some environment variables when needed.  #!/bin/sh export BASE=/home/develop/trees echo $BASE export PATH=$PATH:$BASE echo $PATH   Below the command and the results I can see on my terminal: the script runs, but the variables are not set at the end.  ~$: ./script.sh /home/develop/trees /bin:......:/home/develop/trees ~$: echo $BASE  ~$:    What's wrong? Thanks in advance. Mirko How to use x coordinate of a point and y coordinate of other point? Possible Duplicate:             How to use x coordinate of a point and y coordinate of other point? I need similar to  \coordinate (A) at (2,1); \coordinate (B) at (3,0); \coordinate (C) at (4,3); \coordinate (D) at (5,-1);  \draw (xA,yB) -- (xC,yD); Is it possible to connect two monitors on a laptop, one through HDMI and the other through DisplayPort? For example the Alienware m17x offers 3 connections, HDMI, DisplayPort, and VGA. Is it possible to connect two independent external monitors, one through the DisplayPort and one through the HDMI port? Why this JSFiddle does not work Interpreting plot.lm() I had a question about interpreting the graphs generated by plot(lm) in R.  I was wondering if you guys could tell me how to interpret the scale-location and leverage-residual plots?  Any comments would be appreciated.  Assume basic knowledge of statistics, regression and econometrics. Rate limit suggested edits We need a hard rate limit on suggested edits, to limit the damage someone can do with blasting the review queue with minor edit suggestions.  Case in point:  peppered the site with a whopping 133 tag-only edit suggestions in 2 hours and 15 minutes. That's one edit every minute on average, but towards the end he was entering a new suggestion every 20 seconds. He only stopped because a  drew enough rejections to have him banned from entering more.  If there was a limit to the number of suggested edits you can enter in a time period we could have stopped this guy earlier. No &lt;2k user needs to edit hundreds of tags across that many questions in 2 hours time.  Considerations   There are cases where a retag drive or tag burninate justifies editing a larger number of posts, but I'd be fine if such tasks were limited to people with 2k+ reputation. A retag or burninate job requires a minimal engagement with the community to know when they are justified anyway. The suggested edit review process, by itself, was clearly not enough to stop this barrage. It cannot be seen as a rate limiting measure, at least not as a sufficiently efficient one.  The vast majority of the edits made in the above example were too minor, leaving spelling, grammar and formatting mistakes in the post untouched. The user was going too fast to pay attention to such details anyway. Yet this user has 98 approved edit suggestions, but all but 6 or 7 I'd have rejected as too minor, so the review process itself is broken.   What should be limited   The number of review votes reviewers have is already limited; I burned through 20 reviews in short order just reviewing the suggestions from just this one user. Certainly the number of unreviewed suggestions should be limited to let reviewers catch up with a user like this. I'd say having 20 outstanding suggested edits pending review is plenty. Suggested edits should be made with some consideration; we don't want minor edits, so if you are suggesting more than 20 in an hour (that's 1 every 3 minutes) you are not improving posts anymore, you are gaming the system to gain reputation. I am not very familiar with databases and the theories behind how they work.  Is it any slower from a performance standpoint (inserting/updating/querying) to use Strings for Primary Keys than integers? novel with psi slavery Name the novel, 197x.  Setting is a world of human(oid)s most of whom have the psi ability to enslave weaker others.  (Maybe the word slave and its derivatives are not used.)  Masters and slaves form a tree rather than a dichotomy; everyone delegates as much as they can. The protagonist is an outworlder on a mission, maybe simply doing a survey.  He wears the green robe of a native subculture who lack the power (or maybe they renounce it?) and are immune to it – by law or custom, I think, rather than by nature. His host or primary contact is Jael Forty of Lant, the number being how many slaves he can control; it can fluctuate. As per the title, what hardware do I need to be able to run various versions of Android? The phrase "sleeping with someone" often means "having sex." What is the origin of this sexual connotation? Is there a non-sexual equivalent of this phrase to express sleeping with someone without sexual intercourse? Identification of fuzzy insect in Pennsylvania I live in south eastern Pennsylvania, USA. About a month ago I came across this very peculiar insect. Its body was about an inch long, it was fuzzy, and it had a long proboscis(?) and long orange legs.  I've been wondering about it ever since. Can anyone identify it? In my bash script I have an external (received from user) string, which I should use in sed pattern.  REPLACE="&lt;funny characters here&gt;" sed "s/KEYWORD/$REPLACE/g"   How can I escape the $REPLACE string so it would be safely accepted by sed as a literal replacement?  NOTE: The KEYWORD is a dumb substring with no matches etc. It is not supplied by user. Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to other group I'm currently working on a proof, but didn't get the right idea, a hint would be appreciated:  Show that $\mathbb{Z}/n^2\mathbb{Z}$ is not isomorphic to $\mathbb{Z}/n \times \mathbb{Z}/n$  So, lets assume there is an isomorphism between these groups, my first idea to was to construct a contradiction with the homomorphism property. But I don't know how, there should be an element in  $\mathbb{Z}/n \times \mathbb{Z}/n$ which is not in $\mathbb{Z}/n^2$ to reach this kind of contradiction. Of course there is $n \in \mathbb{Z}/n^2$ which is not in the other group but I don't know if this helps.  Thanks How to clear the Skype chat history how clear the skype chat history ? How do I find the right size of filters for a lens? I was looking to get a circular polarizing filter and an UV filter for my Canon 550D, 18-135mm lens. When I checked online I found these filters came in different sizes, like 62mm, 67mm, 72mm, 77mm. How do I know which is right?  Also, will there be any degradation of photo quality if I put both these filters on the lens? Run apt-get without sudo I've been having trouble getting my server to send email and I haven't for the life of me figured out how to fix it. If anyone could give me some simple pointers, that would be muchly appreciated!  May 19 15:36:03 ubuntu-12 sm-mta[2484]: s4JFa3jp002484: from=&lt;www-data@ubuntu-12.04-     production&gt;, size=412, class=0, nrcpts=1, msgid=&lt;201405191535.s4JFZw4c002483@ubuntu-12.04-  production&gt;, proto=ESMTP, daemon=MTA-v4, relay=ip6-localhost [127.0.0.1] May 19 15:36:03 ubuntu-12 sendmail[2483]: s4JFZw4c002483: to=myname@mycompany.com, ctladdr=www-data (33/33), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=30123, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s4JFa3jp002484 Message accepted for delivery) May 19 15:36:03 ubuntu-12 sm-mta[2487]: s4JFa3jp002484: to=&lt;myname@mycompany.com&gt;, ctladdr=&lt;www-data@ubuntu-12.04-production&gt; (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120412, relay=mailserver.mycompany.com. [213.171.216.115], dsn=5.0.0, stat=Service unavaila$ May 19 15:36:03 ubuntu-12 sm-mta[2487]: s4JFa3jp002484: s4JFa3jp002487: DSN: Service unavailable May 19 15:36:03 ubuntu-12 sm-mta[2487]: s4JFa3jp002487: to=&lt;www-data@ubuntu-12.04-production&gt;, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent The set of all finite subsets of the natural numbers is countable