tag:blogger.com,1999:blog-51645473868928416492024-02-06T19:37:29.098-08:00Solutions to Different Linux ProblemsLinux users we provide solutions to different Problems we face every Day. This is Linux Troubleshoot Site, developed by Linux users.Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.comBlogger111125tag:blogger.com,1999:blog-5164547386892841649.post-77044417292167070772015-07-07T07:11:00.000-07:002015-07-07T07:11:43.529-07:00HHVM Failed to open /var/www/.hhvm.hhbc<div dir="ltr" style="text-align: left;" trbidi="on">
Hi if you get error Like Below<br />
<br />
<span style="color: red;">Failed to initialize central HHBC repository:\n Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: RepoQuery::step(repo=0x7f814678e600) error: 'CREATE TABLE main.UnitSourceLoc_6ba408ef27e1fc7820c8bd6352989f40c1acb812(unitSn INTEGER, pastOffset INTEGER, line0 INTEGER, char0 INTEGER, line1 INTEGER, char1 INTEGER, PRIMARY KEY (unitSn, pastOffset));' --> (13) database or disk is full\n Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file\n<br /> </span><br />
<span style="color: red;">Failed to initialize central HHBC repository:\n Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: RepoQuery::step(repo=0x7fdf7b38e600) error: 'CREATE TABLE main.UnitSourceLoc_6ba408ef27e1fc7820c8bd6352989f40c1acb812(unitSn INTEGER, pastOffset INTEGER, line0 INTEGER, char0 INTEGER, line1 INTEGER, char1 INTEGER, PRIMARY KEY (unitSn, pastOffset));' --> (13) database or disk is full\n Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file\n</span><br />
<br />
<u>Solution</u><br />
create /var/www folder<br />
and change owner to www-data<br />
in /var folder run below commands <br />
mkdir www <br />
chown www-data:www-data www</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com4tag:blogger.com,1999:blog-5164547386892841649.post-74155673328884741422015-02-19T03:52:00.000-08:002015-02-19T03:55:02.545-08:00How to Install Scrapy in Linux with out Any Errors<div dir="ltr" style="text-align: left;" trbidi="on">
While installing Scrapy (Python Crawl) you may get errors like below<br />
<br />
1. src/lxml/lxml.etree.c:16:20: fatal error: Python.h: No such file or directory<br />
#include "Python.h"<br />
<br />
2. Setup script exited with error: command 'gcc' failed with exit status 1<br />
<br />
3. fatal error: openssl/aes.h: No such file or directory<br />
#include <openssl/aes.h><br />
<br />
<br />
4. c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory<br />
#include <ffi.h><br />
<br />
Above errors are problems of dependences while installing Scrapy<br />
<br />
to avoid these error you need to install following packages (assuming you already have python2 and python3)<br />
<br />
<span style="background-color: yellow;">Note : based on distribution some times -devel work otherwise try -dev</span><br />
<span style="background-color: yellow;">example if python3-devel error then try python3-dev </span><br />
<br />
install gcc <br />
install python-devel<br />
install python3-devel<br />
install libevent-devel<br />
install python3-setuptools (Optional)<br />
install python-setuptools<br />
install openssl<br />
install libxslt-devel (if libxslt-devel error then try libxslt1-devel)<br />
install libxml2-devel<br />
install libffi-devel<br />
install libssl-dev (if libssl-dev error then try openssl-devel)<br />
<br />
Finally to install Scrapy<br />
easy_install scrapy<br />
<br />
<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com1tag:blogger.com,1999:blog-5164547386892841649.post-38646275671522913972014-10-14T10:17:00.000-07:002014-10-14T10:17:58.111-07:00Solution : PHP Warning: date(): It is not safe to rely on the system's timezone settings<div dir="ltr" style="text-align: left;" trbidi="on">
Hi If you get error add below code in your php file<br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">if( ! ini_get('date.timezone') )<br />{<br /> date_default_timezone_set('GMT');<br />}</span></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-35288738904601316192014-09-06T13:03:00.000-07:002014-09-06T13:03:36.394-07:00Steps to Install Xrdp in Ubuntu and Remote Desktop in Windows<div dir="ltr" style="text-align: left;" trbidi="on">
Here the steps to Install Xrdp in Ubuntu and Remote Desktop in Windows<br />
<br />
1. install xrdp<br />
sudo apt-get install xrdp<br />
<br />
2. install fallback<br />
sudo apt-get install gnome-session-fallback<br />
<br />
3. logout and login again by gnome theme. You can choose theme before log in (this step Optional)<br />
<br />
4. open terminal by ctrl alt t , then input<br />
echo "gnome-session --session=gnome" > ~/.xsession<br />
<br />
5. sudo gedit /etec/xrdp/startwm.sh<br />
. /etc/X11/Xsession<br />
to<br />
. /home/<user name>/.xsession<br />
<br />
6. sudo /etc/init.d/xrdp restart<br />
<br />
7. Open Remote Desktop application in Window and Enter Ubuntu System IP and click connect<br />
<br />
8. Enter username and password of Ubuntu System<br />
<br />
9. Enjoy</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-68436020514364990482014-07-19T11:13:00.001-07:002014-07-19T11:24:01.220-07:00CodeBlocks wxWidgets in Windows with 100% working Setup<div dir="ltr" style="text-align: left;" trbidi="on">
To complete CodeBlocks wxWidgets in Windows I tried lot of times but always there is an error while compiling ( <span style="background-color: orange;">if not exist gcc_mswu mkdir gcc_mswu</span> ). here the successful steps<br />
1. It may be easy to install CodeBlock by simply downloading from <a href="http://www.codeblocks.org/downloads/26" target="_blank">here</a> and click install in windows.<br />
2. Download and unzip wxWidgets (version i used wxWidgets 3.0.1) from <a href="https://www.wxwidgets.org/downloads/" target="_blank">here</a><br />
3. Goto control panel->system->Advance settings->Environment variable->Edit path variable (system level path)<br />
Copy entire path value and save in a text file now Remove every thing from path (Be-live me)<br />
and add only codeblock/mingw/bin path(check below example) to path variable and click ok.<br />
example : C:\Program Files\CodeBlocks\MinGW\bin<br />
4. <span style="background-color: #6aa84f;">Very Important open command prompt as Administrator</span><br />
5. Goto wxWidgets\build\msw (check below example) location in command prompt<br />
example: E:\wxWidgets-3.0.1\build\msw<br />
6. Run Below commands one by one<br />
<pre style="background-color: #f9f9f9; border: 1px solid rgb(221, 221, 221); font-family: monospace, Courier; font-size: 14px; line-height: 1.3em; padding: 1em;">mingw32-make.exe -f makefile.gcc clean </pre>
<pre style="background-color: #f9f9f9; border: 1px solid rgb(221, 221, 221); font-family: monospace, Courier; font-size: 14px; line-height: 1.3em; padding: 1em;">mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0</pre>
<pre style="background-color: #f9f9f9; border: 1px solid rgb(221, 221, 221); font-family: monospace, Courier; font-size: 14px; line-height: 1.3em; padding: 1em;"><span style="line-height: 1.3em;">mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=0</span></pre>
<br />
Same command two times one for Release and another for Debug<br />
7. Now In codeblock while creating wxWidget project select wxWidgets extracted folder as path<br />
example: E:\wxWidgets-3.0.1<br />
8. <span style="background-color: #6aa84f;">Edit path variable add previously saved path to existing path by separating with semicolon (;) .</span><br />
<span style="background-color: #6aa84f;">example : C:\Program Files\CodeBlocks\MinGW\bin; previously_saved_path</span></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-85585199079967043552014-06-19T07:32:00.000-07:002014-06-19T07:39:59.268-07:00Android device chooser not showing running Emulator in Eclipse<div dir="ltr" style="text-align: left;" trbidi="on">
if Android device chooser not showing running emulator then reset ADB<br />
To restart ADB in Eclipse :<br />
Window -> Show View -> Other -> Android -> Devices<br />
When the view is showing: View Menu of "Devices" (click Down rectangle) > Reset ADB<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpnGac1J0Zx391uWNiCqXdRB69BQ2jWwxNu4JROTd5oSKcbIf2VE0LS1X3YJBRZFTtWonDH8A1i5SnnUOp-ZwYii1uvZOieSeRbS__G1Qofs2BPdxhgoI8l4VtrTqyf048EtvgId3E2-k/s1600/eclipse.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpnGac1J0Zx391uWNiCqXdRB69BQ2jWwxNu4JROTd5oSKcbIf2VE0LS1X3YJBRZFTtWonDH8A1i5SnnUOp-ZwYii1uvZOieSeRbS__G1Qofs2BPdxhgoI8l4VtrTqyf048EtvgId3E2-k/s1600/eclipse.png" height="190" width="400" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-91254844321061097002014-06-19T07:26:00.000-07:002014-06-19T07:26:26.039-07:00PhoneGap after Importing Android Projects to Eclipse Errors<div dir="ltr" style="text-align: left;" trbidi="on">
If you got Different error after importing phonegap created projects into Eclipse as existing android project.<br />
<br />
<span style="background-color: lime;">Note : While Importing <u>do not set copy Project to Workspace</u>, use same location where phonegap created project.</span><br />
<br />
To solve all other errors do below steps.<br />
a) import project from Android folder it will import both "hello world" and "hello world-cordovaLib"<br />
b) clean both projects Project->Clean All (select two projects and unselect Automatic Build)->Clean<br />
c ) remove the reference to "hello world-cordovaLib" from "hello world"<br />
Rightclick on Hello World->Project->Android->is Library->Remove Reference of hello world-cordovaLib<br />
d) build the "hello-cordovaLib"<br />
e) restore the reference to "hello world-cordovaLib" from "hello world"<br />
Rightclick->Project->Android->is Library->Add Reference of hello world-cordovaLib<br />
f) clean "hello world" and run<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-67389666943703405872014-06-12T05:42:00.000-07:002014-06-12T05:42:12.183-07:00Solution : WordPress Error Briefly unavailable for scheduled maintenance Check back in a minute<div dir="ltr" style="text-align: left;" trbidi="on">
If you got Briefly unavailable for scheduled maintenance Check back in a minute error in WordPress means there is a .maintenance file in WordPress installed directory. To avoid this error go to WordPress installed location in your server and <b><span style="color: #38761d;">delete .maintenance</span></b> file.<br />
check below video<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/FE1lH7Hpe24" width="560"></iframe>
<br />
<a href="https://www.youtube.com/watch?v=FE1lH7Hpe24" target="_blank">watch in YouTube</a> </div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com2tag:blogger.com,1999:blog-5164547386892841649.post-45469475170320805862014-05-15T12:17:00.001-07:002014-05-15T12:18:48.533-07:00Solution : Nginx 502 Bad Gateway Error<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;">If you got 502 Bad Gateway Error in Nginx after updating software in your system.</span><br />
<span style="background-color: yellow;"><span style="font-size: large;">Because of update in php-fpm this error may occur.</span></span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">1. Edit /etc/php-fpm.d/www.conf</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">vi /etc/php-fpm.d/www.conf</span><br />
<span style="font-size: large;">And set listen line to look as follows:</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">listen = 127.0.0.1:9000</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">2. Now change nginx configuration files of each domain which may be in /etc/nginx/conf.d folder. in each file change</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">fastcgi_pass unix:/tmp/php5-fpm.sock;</span><br />
<span style="background-color: red; font-size: large;">to </span><br />
<span style="font-size: large;">fastcgi_pass 127.0.0.1:9000;</span><br />
<span style="font-size: large;"><br /></span>
<span style="background-color: #6aa84f; font-size: large;">Restart nginx and php-fpm</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">And check in browser whether your site working or Not.</span><br />
<span style="font-size: large;"><span style="background-color: yellow;"></span></span><br />
<span style="font-size: large;">I hope It will work :)</span><br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-70924874391542375552014-02-28T00:44:00.002-08:002014-02-28T01:06:00.331-08:00solution to installation of expect module in php5<div dir="ltr" style="text-align: left;" trbidi="on">
following message will come if php expect module didn't find on web server expect example page.<br />
<br />
<span style="color: red;">fopen(): Unable to find the wrapper "expect" - did you forget to enable it when you configured PHP?</span><br />
<span style="color: red;"><br /></span>
This means expect.so is not there in /usr/lib/php5/extensions<br />
<br />
to install expect module follow streps :<br />
<br />
<br />
1. Before installation install dependencies : expect-devel, tcl-devel packages<br />
<br />
2. run following command to build and install expect module<br />
<span style="color: orange;"><br /></span>
<span style="color: orange;">pecl install channel://pecl.php.net/expect-0.3.1</span><br />
<br />
It will create /usr/lib/php5/extensions/expect.so file<br />
<br />
3. Now add config file for php in /etc/php5/conf.d/expect.ini<br />
<br />
<span style="color: orange;">cat > /etc/php5/conf.d/expect.ini << END</span><br />
<span style="color: orange;">; comment out next line to disable mysqli extension in php</span><br />
<span style="color: orange;">extension=expect.so</span><br />
<div>
<span style="color: orange;">END</span></div>
<br />
4. Now check php modules by following command:<br />
<br />
<span style="color: orange;">php -m </span><br />
<br />
If you get following error :<br />
<br />
1<span style="color: red;"> /usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -lexpect</span><br />
<span style="color: red;">/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -ltcl</span><br />
<span style="color: red;">collect2: error: ld returned 1 exit status</span><br />
<span style="color: red;">make: *** [expect.la] Error 1</span><br />
<span style="color: red;">ERROR: `make' failed</span><br />
<div>
<br /></div>
<div>
<br /></div>
<div>
for that go to /usr/lib/ </div>
<div>
<span style="color: orange;"><br /></span></div>
<div>
<span style="color: orange;">ln -s libexpect<version>.so libexpect.so</span></div>
<div>
<span style="color: orange;">ln -s libtcl<version>.so libtcl.so</span></div>
<div>
<br /></div>
<div>
( <version> : is the version number of the package )</div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-26760891694632965062014-02-11T21:04:00.000-08:002014-02-11T21:05:23.036-08:00Solution to Gnome 3 Error : "Oh no! Something has gone wrong." with gnome-fallback<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
Login into your account in text terminal by ctrl+alt+f<1-6><br />
<br />
run following line<br />
<br />
<pre style="border: 0px; color: #222222; direction: ltr; font-size: 1em; line-height: 18.99305534362793px; overflow: auto; padding: 0px; width: 1186.736083984375px;"><code style="display: inline-block; font-size: 1em; padding: 0.75em;">$ gsettings set org.gnome.desktop.session session-name gnome-fallback</code></pre>
<pre style="border: 0px; color: #222222; direction: ltr; font-size: 1em; line-height: 18.99305534362793px; overflow: auto; padding: 0px; width: 1186.736083984375px;"></pre>
<pre style="border: 0px; color: #222222; direction: ltr; font-size: 1em; line-height: 18.99305534362793px; overflow: auto; padding: 0px; width: 1186.736083984375px;">Then try login from gui using GNOME Desktop Environment.</pre>
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com1tag:blogger.com,1999:blog-5164547386892841649.post-10045907149030977912014-02-10T01:06:00.001-08:002014-02-10T01:06:38.549-08:00Nginx Error - 413 Request Entity Too Large<div dir="ltr" style="text-align: left;" trbidi="on">
Hi if you get 413 Request Entity Too Large error in Nginx Serve to avoid this error some people suggest increase post size in php.ini ie<br />
post_max_size = 25M<br />
But even changing this value error still occurring means you need to change nginx configuration file.<br />
add client_max_body_size 20M to nginx configuration file of server. check below where to add that line.<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">server {</span><br />
<span style="font-family: Courier New, Courier, monospace;"> <span style="background-color: yellow;">client_max_body_size 20M;</span></span><br />
<span style="font-family: Courier New, Courier, monospace;"> listen 80;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> server_name example.com;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> access_log /var/log/nginx/nginx.access.log;</span><br />
<span style="font-family: Courier New, Courier, monospace;"> error_log /var/log/nginx/nginx.error.log;</span><br />
<span style="font-family: Courier New, Courier, monospace;">....</span><br />
<span style="font-family: Courier New, Courier, monospace;">....</span><br />
<span style="font-family: Courier New, Courier, monospace;">}</span></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-5719136812756296072014-01-23T08:24:00.000-08:002014-01-23T08:24:20.054-08:00Solution : Blogger Remove Site name from Page Title<div dir="ltr" style="text-align: left;" trbidi="on">
Hi, To remove site or blog name from the every title of blogger Page, you need to edit HTML Template of your blog<br />
<br />
Goto<br />
<h1 class="GHUY-LPK5 blogg-name" style="border: 0px; color: #222222; font-family: 'Open Sans', Helvetica, Arial, sans-serif; font-size: 20px; font-weight: 400; line-height: 30px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: nowrap;">
<span style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; color: #f26300; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;">Template -> Edit HTML</span></span></h1>
<div>
<span style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; color: #f26300; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"><br /></span></span></div>
<div>
<span style="border: 0px; display: inline-block; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;">Now find</span></span></div>
<div>
<span style="border: 0px; display: inline-block; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"><br /></span></span></div>
<div>
<span style="background-color: white; border: 0px; display: inline-block; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"> </span><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"><span style="font-family: Courier New, Courier, monospace;"><title><data:blog.pageTitle/></title></span></span></span></div>
<div>
<span style="border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: top;"><span style="font-family: Courier New, Courier, monospace;"><span style="background-color: white; font-style: inherit; font-weight: inherit;"><br /></span></span></span></span></div>
<div>
<span style="border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="background-color: white; border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: top;"><span style="color: red; font-family: Courier New, Courier, monospace;"><b><span style="font-style: inherit;">And </span>replace above line with<span style="font-style: inherit;"> </span></b></span></span></span></div>
<div>
<span style="border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="background-color: yellow; border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: top;"><span style="font-family: Courier New, Courier, monospace;"><span style="font-style: inherit; font-weight: inherit;"><br /></span></span></span></span></div>
<div>
<span style="border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; margin: 0px; padding: 0px; vertical-align: top;"><span style="font-family: Courier New, Courier, monospace;"><span style="background-color: white; font-style: inherit; font-weight: inherit;"><div>
<b:if cond='data:blog.pageType == "index"'></div>
<div>
<title><data:blog.title/></title></div>
<div>
<b:else/></div>
<div>
<title><data:blog.pageName/></title></div>
<div>
</b:if></div>
</span></span></span></span></div>
<div>
<span style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"><br /></span></span></div>
<div>
<span style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"><br /></span></span></div>
<div>
<span style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"><span class="GHUY-LPL5" style="border: 0px; display: inline-block; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: top;"><br /></span></span></div>
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-90004906492271820242014-01-23T07:46:00.000-08:002014-01-23T07:50:22.770-08:00Solution : Nginx Wordpress Pretty Permalinks Problem<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;">To enable Pretty Permalinks feature in nginx simply modify the nginx conf file of wordpress site add following line</span><br />
<span style="background-color: yellow; font-family: Courier New, Courier, monospace; font-size: large;">try_files $uri $uri/ /index.php?$args;</span><br />
<span style="font-size: large;">check example where to add above line</span><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;">Example:</span><br />
<span style="font-size: large;">file: wordpress.conf</span><br />
<span style="font-size: large;">.....................</span><br />
<span style="font-size: large;">.......................</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"> location / {</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"> root /var/www/html/wordpress;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"> index index.php index.html index.htm;</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"><span class="Apple-tab-span" style="white-space: pre;"> </span><span style="color: #38761d;">try_files $uri $uri/ /index.php?$args;</span></span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"> ...</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"> .....</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: large;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: large;"> }</span><br />
<span style="font-size: large;">................</span><br />
<span style="font-size: large;">................</span></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-34727956968586328302014-01-02T05:22:00.002-08:002014-01-23T07:59:38.035-08:00Solution to record your Desktop Using FFMPEG in linux<div dir="ltr" style="text-align: left;" trbidi="on">
Install ffmpeg packages in linux ( fedora, ubuntu and etc ) using installers (yum,apt-get and etc)<br />
<br />
use the following command to record the Desktop :<br />
<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">ffmpeg -r 30 -s 1280x720 -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi</span><br />
<br />
<br />
<div>
But when we give resolution 1280x720 it will only take that part of your Desktop ( or some it will not record when your Desktop resolution is less the specified ) for that problem we need use one small script to record the Desktop</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cat > record_myDesktop.sh << EOF</span></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">#!/bin/bash</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">cur_dis=$( xrandr | grep '*' )</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">res=$(echo $cur_dis |awk '{print $1}')</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">echo $cur_dis</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">echo "ffmpeg -r 30 -s $res -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi"</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">ffmpeg -r 30 -s $res -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi</span></div>
</div>
<div>
<span style="font-family: Courier New, Courier, monospace;">EOF</span></div>
<div>
<br /></div>
<div>
chmod +x record_myDesktop.sh </div>
<div>
<br /></div>
<div>
./record_myDesktop.sh</div>
<div>
<br /></div>
<div>
--</div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-63080167377069797072013-12-24T04:18:00.000-08:002013-12-24T04:18:05.503-08:00Solution to We couldn't complete your purchase using card MasterCard error in PayPal<div dir="ltr" style="text-align: left;" trbidi="on">
If you are getting <span style="color: red;">link a new debit or credit card to make an instant payment </span>error or <span style="color: red;">we couldn't complete your purchase using card MasterCard</span> error while paying through paypal by using Debit Card means actually there is Problem with card or You are Paying in Wrong Currency means <span style="background-color: yellow;">order in Dollar you are paying in Rupees</span>. Check below Video to complete Solution.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/Q0DUcEBw2PE" width="560"></iframe></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-7969885050528717542013-12-20T23:55:00.000-08:002013-12-20T23:55:06.006-08:00Solution to change Network device Name (eth0) in CentOS, Fedora Linux <div dir="ltr" style="text-align: left;" trbidi="on">
<b>Open the /etc/udeve/rules.d/70-persistent-net.rules and change NAME as your require.</b><br />
<b><br /></b>
<b>cat /etc/udev/rules.d/70-persistent-net.rules </b><br />
<b># This file was automatically generated by the /lib/udev/write_net_rules</b><br />
<b># program, run by the persistent-net-generator.rules rules file.</b><br />
<b>#</b><br />
<b># You can modify it, as long as you keep each rule on a single</b><br />
<b># line, and change only the value of the NAME= key.</b><br />
<b><br /></b>
<b># PCI device 0x15ad:0x07b0 (vmxnet3)</b><br />
<b>SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:b6:64:c5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"</b><br />
<div>
<br /></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-8469157048927062642013-12-17T01:46:00.002-08:002013-12-17T01:51:58.555-08:00Rocks Cluster : untrusted X11 Warning Message when SSH X11 compute Nodes<div dir="ltr" style="text-align: left;" trbidi="on">
When we login ssh with X11 from rocks master node to computer node it doesn't allow X11 to forward as :<br />
<br />
$ ssh node10 -X<br />
Warning: untrusted X11 forwarding setup failed: xauth key data not generated<br />
Warning: No xauth data; using fake authentication data for X11 forwarding.<br />
Last login: Tue Dec 17 20:34:52 2013 from test.rocks.com<br />
Rocks Compute Node<br />
Rocks 6.1 (Emerald Boa)<br />
Profile built 14:32 21-Nov-2013<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
For that In Rocks Master node edit /etc/ssh/ssh_config add following line :</div>
<div>
<br /></div>
<div>
ForwardX11Trusted yes</div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-50033689074642135842013-12-16T02:15:00.003-08:002013-12-16T20:55:11.109-08:00Installation of GCC 4.8.2 compilers on CentOS 6 x86_64<div dir="ltr" style="text-align: left;" trbidi="on">
Before Installing GCC 4.8.2 get packages and pre-requisties :<br />
<br />
GCC 4.8.2 http://mirrors.ispros.com.bd/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2<br />
<br />
Pre-requesties :<br />
<br />
MPC http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz<br />
MPFR http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.bz2<br />
GMP https://gmplib.org/download/gmp/gmp-5.1.3.tar.bz2<br />
ISL ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/isl-0.11.1.tar.bz2<br />
CLOOG ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/infrastructure/cloog-0.18.0.tar.gz<br />
<br />
<br />
Install Development Tools :<br />
<br />
yum groupinstall "Development tools"<br />
<br />
<br />
Install 32 bit library support :<br />
<br />
yum install glibc-devel.i686 glibc-i686<br />
<br />
<br />
First extract gcc-4.8.2.tar.bz2 :<br />
<br />
tar -jxvf gcc-4.8.2.tar.bz2<br />
cd gcc-4.8.2<br />
<br />
Now got that extracted gcc folder extract pre-requesties and rename extracted folders to their names as simillary:<br />
<br />
tar -zxvf ../mpc-1.0.1.tar.gz<br />
tar -jxvf ../mpfr-3.1.2.tar.bz2<br />
..<br />
mv mpc-1.0.1 mpc<br />
mv mpfr-3.1.2 mpfr<br />
...<br />
<br />
Now configure GCC :<br />
<br />
./configure --prefix=/opt/gcc-4.8.2/<br />
make<br />
make -k check<br />
make install<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-50273947143607901782013-09-20T02:34:00.000-07:002013-09-20T02:34:56.854-07:00Service modules_dep in Linux Enable or Disable<div dir="ltr" style="text-align: left;" trbidi="on">
Service modules_dep in Linux Enable or Disable - <span style="background-color: #93c47d;"><span style="color: yellow;">Enable it</span></span><br />
It is one-time bootup script, not a daemon. So it does not consume resources after bootup. You can browse its source code at /etc/init.d/modules_dep<br />
<br />
It's a small script that fixes module.dep for iptables</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-60837033646305279912013-09-20T02:27:00.001-07:002013-09-20T02:27:31.762-07:00Saslauthd Linux Service enable or disable<div dir="ltr" style="text-align: left;" trbidi="on">
Saslauthd Linux Service disable or enable is depend on your <span style="background-color: yellow;">postfix</span><br />
<br />
saslauthd is a daemon process that handles plaintext authentication requests on behalf of the SASL library<br />
<br />
Postfix for SMTP Authentication using SASL for this saslauthd necessary<br />
<br />
so if you are running postfix then enable Saslauthd service otherwise disable Saslauthd service</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-67889469875648262632013-09-05T00:14:00.001-07:002013-09-05T00:14:40.288-07:00Solution : DBus error org.gtk.Private.RemoteVolumeMonitor.Failed:An operation is already pending<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: inherit;">If you get Unable to mount usb drives and getting DBus error org.gtk.Private.RemoteVolumeMonitor.Failed:An operation is already pending like below</span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheoe8Ysub3OXJNHLQU3joJ6T58t_63doMsoyk6GYdCixSYBb-sOiqHWj3ZgbBO88nNDYy3_zmsqizOn_1yL9fYTHVX_ItrWJkYeqhwmD3HkStqx656vmGBv1YKPpFnyLaAUx64opuX05s/s1600/Unable+to+mount+Pen+Drive.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="158" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheoe8Ysub3OXJNHLQU3joJ6T58t_63doMsoyk6GYdCixSYBb-sOiqHWj3ZgbBO88nNDYy3_zmsqizOn_1yL9fYTHVX_ItrWJkYeqhwmD3HkStqx656vmGBv1YKPpFnyLaAUx64opuX05s/s400/Unable+to+mount+Pen+Drive.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: inherit;">Solution is </span><span class="Apple-style-span" style="background-color: cyan;">Do as root</span></div>
<div style="text-align: left;">
<span class="Apple-style-span" style="font-family: inherit;"><br /></span></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
[root@sys ~]#<span class="Apple-style-span" style="color: #3d85c6;"> cd /media/</span></div>
<div style="text-align: left;">
[root@sys media]# <span class="Apple-style-span" style="color: #3d85c6;">ls -a</span></div>
<div style="text-align: left;">
. .. 04376381-139c-4953-bd94-8d9ae3a23790 .hal-mtab-lock NAGESH J</div>
<div style="text-align: left;">
<span class="Apple-style-span" style="background-color: yellow;">remove .hal-mtab-lock</span></div>
<div style="text-align: left;">
[root@sys media]# <span class="Apple-style-span" style="color: #3d85c6;">rm -rf .hal-mtab-lock </span></div>
<div style="text-align: left;">
[root@sys media]# </div>
<div style="font-family: inherit;">
<br /></div>
<br />
</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-24063027314301398252013-09-04T23:27:00.000-07:002013-09-04T23:29:13.909-07:00Which services should be disabled in Linux<div dir="ltr" style="text-align: left;" trbidi="on">
To enhance performance you can disable some services in Linux system check below information to disable unimportant services<br />
<br />
-----------------------------------------------------------------<br />
NetworkManager 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
You can do without NetworkManager, but I find it awfully handy for dealing with changing wifi on a laptop (which you say you're using). If you don't need it, though, no harm in turning this off.<br />
-----------------------------------------------------------------<br />
acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
This is probably what's making your power button work, and what makes the system suspend when you close the lid. You can live without it, but probably don't want to.<br />
-----------------------------------------------------------------<br />
auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
This is the userspace part of the Linux Auditing System, which is a more secure way of logging kernel-level events than syslog. Among other things, it records SELinux alerts. Strictly speaking, you don't need it.<br />
-----------------------------------------------------------------<br />
avahi-daemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
<br />
This is for autodiscovery of services on a network — printers being a big example. It's not required.<br />
-----------------------------------------------------------------<br />
cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off<br />
<br />
This will probably just start the right in-kernel CPU frequency scaling driver as an on-start operation, and not run anything. (And if it can't for whatever reason and runs the daemon, you probably want it.)<br />
-----------------------------------------------------------------<br />
haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
<br />
This runs hald, which is in the process of being obsoleted but which is, as of Fedora 14, still used for a few things. Best to leave it on for now<br />
-----------------------------------------------------------------<br />
ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
This sets up the kernel-level packet filter and doesn't leave any user-space daemon running. Leave it on.<br />
-----------------------------------------------------------------<br />
irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
<br />
This is for multi-cpu/multi-core systems. If you just have one, it will exit harmlessly after a few seconds. You can gain a few milliseconds of startup time by chkconfiging it off.<br />
-----------------------------------------------------------------<br />
lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off<br />
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
If you're sure you're not using lvm (note that you can use ext4 on top of lvm!), you can turn off lvm2-monitor, and the same goes for md software RAID and mdmonitor.<br />
-----------------------------------------------------------------<br />
messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
This is the d-bus system message bus. If you're using a modern desktop environment, you'll basically need this. If you're not, you can get away without it, but will probably have to hack things up. (I'm pretty sure gdm needs it, for example.)<br />
-----------------------------------------------------------------<br />
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
<br />
This doesn't run any daemons, but starts any network filesystems in /etc/fstab/. It's harmless either way.<br />
-----------------------------------------------------------------<br />
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br />
<br />
If you're not using NFS, NIS, or some other RPC-based service, all of these can go off.<br />
-----------------------------------------------------------------<br />
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
You technically don't need to log anything, but you probably really want to. You could consider tuning it to work in a more lightweight way on your laptop.<br />
-----------------------------------------------------------------<br />
smolt 0:off 1:off 2:on 3:on 4:on 5:on 6:off<br />
<br />
This sends anonymized usage statistics back to the Fedora Project. It doesn't run anything, but there's a cron file in /etc/cron.d/smolt which checks the state here. If you don't want it, I suggest removing the entire smolt package. (But consider leaving it — the data is useful to the people putting the distro together for you, and it's only once a month.)<br />
-----------------------------------------------------------------<br />
udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off<br />
<br />
Another run-and-done startup script, this one needed to keep rules generated during the boot process around once the system is up. Leave it on.<br />
-----------------------------------------------------------------<br />
<br />
Above information taken from<br />
<a href="http://unix.stackexchange.com/questions/9242/which-services-should-be-disabled" target="_blank">http://unix.stackexchange.com/questions/9242/which-services-should-be-disabled </a><br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-24350187337456211592013-08-31T12:38:00.000-07:002013-08-31T12:38:16.204-07:00How to prevent accidental delete rm -rf * in Linux<div dir="ltr" style="text-align: left;" trbidi="on">
To prevent accidental delete rm -rf * in Linux by different ways<br />
<br />
If you want to prevent any important directory deleted accidental<br />
<br />
Create a file named -i in that directory. How can such a odd file be created? Using touch -- -i or touch ./-i<br />
<br />
Now try rm -rf *:<br />
<br />
<span style="color: #3d85c6;">[root@server]# touch {1..4}</span><br />
<span style="color: #3d85c6;">[root@server]# touch -- -i</span><br />
<span style="color: #3d85c6;">[root@server]# ls</span><br />
1 2 3 4 -i file1 file2 directory1<br />
<span style="color: #3d85c6;">[root@server]# rm -rf *</span><br />
rm: remove regular empty file `1'? n<br />
rm: remove regular empty file `2'?<br />
Here the * will expand -i to the command line, so your command ultimately becomes rm -rf -i.<br />
So command will prompt before removal. You can put these files in your /, /home/, /etc/, / etc.<br />
<br />
<b style="background-color: red;">OR</b><br />
<br />
Use --preserve-root as an option to rm. In the rm included in newer coreutils packages, this option is the default.<br />
<span style="background-color: yellow;">create alias to rm</span><br />
<br />
<span style="color: #3d85c6;">alias rm=rm -i --preserve-root</span><br />
<br />
--preserve-root means do not remove `/' (default)<br />
<br />
<b style="background-color: red;">OR</b><br />
<br />
Use <a href="http://www.safe-rm.org.nz/" target="_blank">safe-rm</a><br />
<br />
<span style="color: #3d85c6;">Safe-rm</span> is a safety tool intended to prevent the accidental deletion of important files by replacing /bin/rm with a wrapper, which checks the given arguments against a configurable blacklist of files and directories that should never be removed.<br />
<br />
Users who attempt to delete one of these protected files or directories will not be able to do so and will be shown a warning message instead:<br />
<br />
<span style="color: #3d85c6;">[root@server]# rm -rf /usr</span><br />
Skipping /usr</div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0tag:blogger.com,1999:blog-5164547386892841649.post-89992081702545959282013-08-29T00:11:00.000-07:002013-08-29T00:15:19.061-07:00Solution : Check Variable in Linux Bash is Float or Interger<div dir="ltr" style="text-align: left;" trbidi="on">
Hi,<br />
<br />
Here solution for checking a variable in Linux Bash is Float or Integer by using grep.<br />
<br />
---- file : test.sh<br />
<br />
function check_int(){<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo $1 | grep "^[0-9]*$" > /dev/null<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if [ $? -ne 0 ]; then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo $2 : $1 is not a number;<br />
else<br />
echo $2 : $1 is a number<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fi<br />
}<br />
<br />
function check_float() {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo $1 | grep "^[0-9]*\.[0-9]*$" > /dev/null<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if [ $? -ne 0 ]; then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>check_int $1 $2<br />
else<br />
echo $2 : $1 is a float number<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fi<br />
}<br />
<br />
<br />
<br />
check_int 12 my_number<br />
check_float 12.2 my_number<br />
<br />
check_int 12a my_number<br />
check_float 12a2 my_number<br />
<div>
<br /></div>
--------------------<br />
<br />
yadavmahi@localhost:~/MahiYadav/scripts> bash test.sh<br />
my_number : 12 is a number<br />
my_number : 12.2 is a float number<br />
my_number : 12a is not a number<br />
my_number : 12a2 is not a number<br />
<div>
<br /></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/04044589192881957277noreply@blogger.com0