#easy to use chmod calculator
Explore tagged Tumblr posts
Photo
Convert for free chmod calculator is a Linux permissions calculator. It is a chmod calculator four digits and is trusted by many. It generates values in octal or symbolic figures. The codes change file permissions. Octal characters are numbers, and symbolic or alphanumeric includes both letters and digits. The chmod mode calculator calculates octal or alphanumeric codes for users. The generated codes can then be applied to relevant files. Chmod calc provides an easy solution to users online, free of cost to change file permissions.
URL: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod calc#chmod mode calculator#linux chmod calculator#Convert For free#Online Calculator#chmod calculator free#chmod calculator 4 digit#actual chmod calculator#easy to use chmod calculator#chmod calculator online#try chmod calculator#digital chmod calculator#chmod permissions
0 notes
Photo
New Post has been published on https://www.techy360.com/2017/11/29/linux-bash-script-step-step-guide/
Linux Bash Script Step By Step Guide , You Will Love It
Today we are going to talk about bash scripting or shell scripting and how to write your first bash script. Actually, they are called shell scripts in general, but we are going to call them bash scripts because we are going to use bash among the other Linux shells.
There are zsh, tcsh, ksh and other shells.
In the previous posts, we saw how to use the bash shell and how to use Linux commands.
The concept of a bash script is to run a series of Commands to get your job done.
To run multiple commands in a single step from the shell, you can type them on one line and separate them with semicolons.
pwd ; whoami
Actually, this is a bash script!!
The pwd command runs first, displaying the current working directory then the whoami command runs to show the currently logged in users.
You can run multiple commands as much as you wish, but with a limit. You can determine your max args using this command.
getconf ARG_MAX
Well, What about putting the commands into a file, and when we need to run these commands we run that file only. This is called a bash script.
First, make a new file using the touch command. At the beginning of any bash script, we should define which shell we will use because there are many shells on Linux, bash shell is one of them.
Bash Script Shebang
The first line you type when writing a bash script is the (#!) followed by the shell you will use.
#! <=== this sign is called shebang. #!/bin/bash
If you use the pound sign (#) in front of any line in your bash script, this line will be commented which means it will not be processed, but, the above line is a special case . This line defines what shell we will use, which is bash shell in our case.
The shell commands are entered one per line like this:
#!/bin/bash # This is a comment pwd whoami
You can type multiple commands on the same line but you must separate them with semicolons, but it is preferable to write commands on separate lines, this will make it simpler to read later.
Set Script Permission
After writing your bash script, save the file.
Now, set that file to be executable, otherwise, it will give you permissions denied. You can review how to set permissions using chmod command.
chmod +x ./myscript
Then try run it by just typing it in the shell:
./myscript
And Yes, it is executed.
Print Messages
As we know from other posts, printing text is done by echo command.
Edit our file and type this:
#!/bin/bash # our comment is here echo "The current directory is:" pwd echo "The user logged in is:" whoami
Perfect! Now we can run commands and display text using echo command.
If you don’t know echo command or how to edit a file I recommend you to view previous articles about basic Linux commands
Using Variables
Variables allow you to store information to use it in your script.
You can define 2 types of variables in your bash script:
Environment variables
User variables
Environment Variables
Sometimes you need to interact with system variables, you can do this by using environment variables.
#!/bin/bash # display user home echo "Home for the current user is: $HOME"
Notice that we put the $HOME system variable between double quotations, and it prints the home variable correctly.
What if we want to print the dollar sign itself?
echo "I have $1 in my pocket"
Because variable $1 doesn’t exist, it won’t work. So how to overcome that?
You can use the escape character which is the backslash before the dollar sign like this:
echo "I have $1 in my pocket"
Now it works!!
User Variables
Also, you can set and use your custom variables in the script.
You can call user variables in the same way like this:
#!/bin/bash
# User variables grade=5 person="Adam" echo "$person is a good boy, he is in grade $grade" chmod +x myscript ./myscript
Command Substitution
You can extract information from the result of a command using command substitution.
You can perform command substitution with one of the following methods:
The backtick character (`).
The $() format.
Make sure when you type backtick character, it is not the single quotation mark.
You must enclose the command with two backticks like this:
mydir=`pwd`
Or the other way:
mydir=$(pwd)
So the script could be like this:
#!/bin/bash mydir=$(pwd) echo $mydir
The output of the command will be stored in mydir variable.
Math calculation
You can perform basic math calculations using $(( 2 + 2 )) format:
#!/bin/bash var1=$(( 5 + 5 )) echo $var1 var2=$(( $var1 * 2 )) echo $var2
Just that easy.
if-then-else Statement
The if-then-else statement takes the following structure:
if command then do something else do another thing fi
If the first command runs and returns zero; which means success, it will not hit the commands after the else statement, otherwise, if the if statement returns non-zero; which means the statement condition fails, in this case, the shell will hit the commands after else statement.
#!/bin/bash user=anotherUser if grep $user /etc/passwd then echo "The user $user Exists" else echo "The user $user doesn’t exist" fi
We are doing good till now, keep moving.
Now, what if we need more else statements.
Well, that is easy, we can achieve that by nesting if statements like this:
if condition1 then commands elif condition2 then commands fi
If the first command return zero; means success, it will execute the commands after it, else if the second command return zero, it will execute the commands after it, else if none of these return zero, it will execute the last commands only.
#!/bin/bash user=anotherUser if grep $user /etc/passwd then echo "The user $user Exists" elif ls /home then echo "The user doesn’t exist" fi
You can imagine any scenario here, maybe if the user doesn’t exist, create a user using the useradd command or do anything else.
Numeric Comparisons
You can perform a numeric comparison between two numeric values using numeric comparison checks like this:
number1 -eq number2 Checks if number1 is equal to number2.
number1 -ge number2 Checks if number1 is bigger than or equal number2.
number1 -gt number2 Checks if number1 is bigger than number2.
number1 -le number2 Checks if number1 is smaller than or equal number2.
number1 -lt number2 Checks if number1 is smaller than number2.
number1 -ne number2 Checks if number1 is not equal to number2.
As an example, we will try one of them and the rest is the same.
Note that the comparison statement is in square brackets as shown.
#!/bin/bash num=11 if [ $num -gt 10] then echo "$num is bigger than 10" else echo "$num is less than 10" fi
The num is greater than 10 so it will run the first statement and prints the first echo.
String Comparisons
You can compare strings with one of the following ways:
string1 = string2 Checks if string1 identical to string2.
string1 != string2 Checks if string1 is not identical to string2.
string1 < string2 Checks if string1 is less than string2.
string1 > string2 Checks if string1 is greater than string2.
-n string1 Checks if string1 longer than zero.
-z string1 Checks if string1 is zero length.
We can apply string comparison on our example:
#!/bin/bash user ="Hello" if [$user = $USER] then echo "The user $user is the current logged in user" fi
One tricky note about the greater than and less than for string comparisons, they MUST be escaped with the backslash because if you use the greater-than symbol only, it shows wrong results.
So you should do it like that:
#!/bin/bash v1=text v2="another text" if [ $v1 > "$v2" ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
It runs but it gives this warning:
./myscript: line 5: [: too many arguments
To fix it, wrap the $vals with a double quotation, forcing it to stay as one string like this:
#!/bin/bash v1=text v2="another text" if [ $v1 > "$v2" ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
One important note about greater than and less than for string comparisons. Check the following example to understand the difference:
#!/bin/bash v1=Hello v2=Hello if [ $v1 > $v2 ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
sort myfile Hello Hello
The test condition considers the lowercase letters bigger than capital letters. Unlike the sort command which does the opposite.
The test condition is based on the ASCII order, while the sort command is based on the numbering orders from the system settings.
File Comparisons
You can compare and check for files using the following operators:
-d my_file Checks if its a folder.
-e my_file Checks if the file is available.
-f my_file Checks if its a file.
-r my_file Checks if it’s readable.
my_file –nt my_file2 Checks if my_file is newer than my_file2.
my_file –ot my_file2 Checks if my_file is older than my_file2.
-O my_file Checks if the owner of the file and the logged user match.
-G my_file Checks if the file and the logged user have the idetical group.
As they imply, you will never forget them.
Let’s pick one of them and take it as an example:
#!/bin/bash mydir=/home/Hello if [ -d $mydir ] then echo "Directory $mydir exists" cd $mydir ls else echo "NO such file or directory $mydir" fi
We are not going to type every one of them as an example. You just type the comparison between the square brackets as it is and complete you script normally.
There are some other advanced if-then features but let’s make it in another post.
That’s for now. I hope you enjoy it and keep practicing more and more.
Thank you.
0 notes
Text
Real Estate Agency Portal Script Développeur
New Post has been published on http://www.developpeur.ovh/1026/
Real Estate Agency Portal
1900+ Happy users! Thank You So Much!
Frontend user login and property submission
Test R-T-L
Documentation
Technical documentation, Knowledge base, FAQ, Support center
Application is based on CodeIgniter PHP framework, if you know CodeIgniter you can easily customize the system.
CodeIgniter is a very simple framework with the best documentation ever seen, so you can easy learn it.
Script was born to be ahead in innovation and at the peak of the real estate portal solutions, specifically designed for easy customization and use.
The script is so awesome that there are several clones on the market (with public confession), you can not make a mistake if you buy the original version
Why is Real estate agency portal script your best choice for real estate business?
You can earn money providing listing and featured submissions for visitors on portal with PayPal/Cash/Bank transfer payment support
You can earn money with Google AdSense or other similar service
You can add custom fields (textareas, inputs, dropdowns, upload) / Indoor amenities / Outdoor amenities / distances direct from Admin interface (No programming skills needed)
Top notch multilanguage (Backend+Frontend) features like auto-translating with MyMemory API service and Google translator (manually corrections are also supported), RTL, look this extra simplicity, try administration!
Real multicurrency support ( different currency and different price on different language and different purposes Sale/Rent )
Exclusive innovation on results filtering (Very simple, intuitive and powerful), you must try this on our live preview!
Supported front-end and backend user-types/roles with submissions: Admin, Agent and front-end Agent/User with admin verification
Front-end Facebook login for extra lazy guys
Each agent/agency and user have public profile page with all listings, logo can be listed on homepage
Enquires system for you and your agents in administration
Extra easy to use, drag & drop multi image upload, reorder images, pages, fields
Innovative drag & drop Menu and pages builder with logical page structure embedded
Check in / check out dates for rental purpose.
Backup your database and files direct from administration
Easy to make new custom theme, Bootstrap responsive example with 6 color styles provided and nice documentation
Track your visitors with Google Analytics
Based on Codeigniter, so if you know it you can easy customize anything you want
Incredible support, documentation, knowledge base, FAQ section and quick answering on any issue!
If at least one of the answers is yes, see the application and you’ll love it.
Add/Edit, Drag & drop any field, Indoor/outdoor amenities, distances, or custom fields like Floor etc. with icons of course.
New innovation with visual rectangle drawing search!
Exclusive innovation on results filtering (Very simple, intuitive and powerful), you must try this on our live preview!
Earn money with submission and featured listings (Cash/Bank transfer also supported) for frontend users, Adsense and similar services is also supported
More then 60+ languages supported with auto-translate feature based on MyMemory API and Google translator
Native multilanguage support
Support all world currencies in listings (can be different based on langauge) and all PayPal supported currencies for PayPal payments
Easy location entering
Auto-suggest based on City, County, Zip
Easy search form template customization
Visual energy efficient and gas emissions plugin
Walkscore plugin integrated
Drag & Drop files/images for multiple upload or reorder
Custom upload fields like plan image company image etc…
Search for properties near your address
Facebook login for lazy guys
Facebook comments social plugin integrated
Agent/admin stars rating and views counter for each property
Extra color examples with demo picker for test
Portal website or full-screen map
Grid or List Layout
What People Are Saying About Real Estate Agency Portal
Extendable with many addons and themes
Download Package
Source JS
Source CSS
Source PHP files
Documentation
Preview example and bootstrap theme examples
Server requirements
PHP version 5.6 or newer
MySQL (4.1+)
Changelog
1.6.0 – 9 November 16
Update to PHP 5.6 as required
offline page support
visual search form builder
Links on slider
some responsive design improvements
address/gps not required
date field type
dropdown multiple field type
is_features for api added
more number format supported for price
profile social links added to property preview
external links improvements
live results counters on sidebar search
search and remove multiple inquiries
user search by email in admin
Update instructions from 1.5.9: extract all files except ”/files” folder and ”/application/config” folder and update database by running updater script: index.php/updater
1.5.9 – 2 July 16
HTTPS issues
PHP7 compatibility improvements
agent description fix
added http://schema.org/LocalBusiness
lite caching feature, for fast loading menu, property, agent pages
recaptcha support
user/admin menu improvements, quick links to edit page
searchable dropdown elements, designed for large number of listings, tested with 100.000
danish flag renamed
custom fields for user profile
map pin markers and amenities icons now can be uploaded via admin
Renamed badget to badge
Hints on property submission form for each field
Updater improvements
Last edit IP saved in database
Update instructions from 1.5.8: extract all files except ?/files? folder and ?/application/config? folder and update database by running updater script: index.php/updater
1.5.8 – 20 February 16
Admin dashboard map translation parameter support
Single website link for homepage in all menu items
inquiries search in admin, same as user/properties
Favicon icon upload
Watermark upload via admin
Property submission disabled feature via admin
Facebook comments widget translations
Commercial google translate api support
Title and link on slider images
Breadcrumb added
customsearch2 template with price scales example
api improvements for external app support
[FIX] change color fix for some login pages
[FIX] double markers when adding property on frontend
[FIX] Fixes in result items
[FIX] External modules compatibility
[FIX] Missing translation on editproperty
Update instructions from 1.5.7: extract all files except ?/files? folder and ?/application/config? folder and update database by running updater script: index.php/updater
1.5.7 – 27 December 15
Field hidden on preview page fix
Spanish and Italian language files update, thanks to E.B.
Image cutter and resizer
Pagination on agent profile page
Update instructions from 1.5.6: extract all files except ?/files? folder and ?/application/config? folder and update database by running updater script: index.php/updater
1.5.6 – 25 October 15
Persian language updated, Thanks to S.G.!
Google translations API updated
Disabled removing last ADMIN
New email your property waiting for activation
New email you property is activated by ADMIN/AGENT
Agent video upload field
“cookie warning for EU” now translatable
Rectangle size depends on zoom index
Google-maps controls reposition
Profile page with pagination
Agent other estates pagination
Dropdown language menu version
Delete multiple properties at once for admin
Upload marker icon/image in bootstrap2-responsive template
Update instructions from 1.5.5: extract all files except ?/files? folder and ?/application/config? folder and update database by running updater script: index.php/updater
1.5.5 – 6 August 15
map popup as widget
translation files zip export
property inquiry form auto populated for logged users
Czech keyboard fix for numeric inputs
Installation error reporting improvement
Validation improvements for non-existing coordinates
Script news hidden for agent
mail & widgets & templates code editor
Mortgage calculator module support (cost additionally)
admin map fixed location support
all emails now have template files
Numerical filtering range enable in database
Facebook share buttons to top on property preview
Only search header template added
Modules in administration
Beta feature: Searching parameters and pagination added to URL, can be enabled with: $config[‘enable_ajax_url’] = TRUE;
Facebook login updated for api v2.4 support, with adding: $config[‘facebook_api_version’] = ‘2.4’;
check chmod on installation and adding languages
Database problem with special chars in password fixed
Update instructions from 1.5.4: extract all files except ?/files? folder and ?/application/config? folder and update database by running updater script: index.php/updater
1.5.4 – 25 May15
Serbian language added, thanks to R.M.!
Installation disabled if database is not empty
Updater, disable clicking 2 times on update button
tidy HTML fixer integrated into auto translator
Admin marker issue, double markers fixed
Backup issue can’t be restored fixed
Add notice to recommend cpanel backups as well
Disable FAQ configurator parameter added
Few settings moved from cms_config.php to administration
My messages added for frontend agents/users
Benchmarking tools
Tested and optimized with 10.000 properties
Performance improvements also in backend/admin
Multi-domain support (different domain for different language)
Agent description added on agent profile page
?search=zagreb now filter also map results
Header template can be changed via admin
Footer template can be changed via admin
On translate files, also translate content if same exists
Properties search in admin
Payment can be disabled
Depended fields (Specific inputs hidden for land or other type of property)
Company info added to preview page
Last script news, tips, instructions added to dashboard
Update instructions from 1.5.3: extract all files except ?/files? folder and ?/application/config? folder and update database by running new updater script: index.php/updater
1.5.3 – 8 March 15
Website link in administration
Configurator improvement
Suffix/Prefix added into property submission forms
Hide copy to other language if only one language is in system
Property preview button in admin page
Reduce register fields configuration
GPS coordinates and Email validation in Settings->Company contact form
Set current language fix in administration
Performance improvements for website with more then 1000 properties
Plan image now showing on non-default languages even if added only for default language…
RTL improvements
Autodetect user language from browser (2 chars) and redirect to language if exists
Required validation added to fields
Paginations ajax url if accessing from google redirected to homepage.
Restricted mode added so only loged user can see page, cms_config.php: // $config[‘enable_restricted_mode’] = TRUE;
estates database structure changes and performance improvements
Map now limited to 100 properties for default preview
Auto-update script for database update
Additional sitemap data like lastmod and changefreq
Rectangle search added to map view
Agent estates on property preview limited to 6
Language tabs always on top when edit property in administration
Improvement on file uploading and deleting validation
Walkscore plugin added to property page
Croatian translations updated
Frequently asked questions added to administration directly
Update instructions from 1.5.2: extract all files except ?/files? folder and ?/application/config? folder and update database by running new updater script: index.php/updater
1.5.2 BETA – 29 December 14
Carousel images improvement for property view, vertical centered, thanks to I.R.
Hide category feature on property preview page, thanks to Y.P.
Translation feature for pages and estate content, thanks to S.L.
Translation and copy to other lang feature added to frontend submission
More translation improvements on file translations
Additional color theme, WHITE
Upload field type for custom uplaods and property plan image uploading
All button added to frontend search, thanks to M.V.
Energy efficient plugin, thanks to S.L. and P.B.
New configuration possibilities: // $config[‘contrast_captcha_enabled’] = TRUE; // $config[‘logout_redirection_uri’] = ’’;
Configurator check captcha folder for writing permissions
var scrollWheelEnabled = false; configuration added to head.php
Agent / User search in administration, Thanks to V.S.
ID added to property preview page
HTML email formating example added
Field “I Agree To The Terms & Conditions” added when submitting property on frontend, thanks to V.S.
Auto created marker when adding new property, simplified gps entering…
Confirmation email on registration
Print button adden on print preview
Marker popup on click or mouseover, configurable, default changed to click…
RSS feature, http://real-estate.iwinter.com.hr/index.php/api/rss/en
JSON export API feature, http://real-estate.iwinter.com.hr/index.php/api/json/en
[FIX] Frontend user profile image ordering
[FIX] Frontend user my properties title link
[FIX] Backend tables responsive on mobile devices
[FIX] Autocomplete disabled on smart search input field
[FIX] MyMemory translation api
Update instructions from 1.5.1: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.5.2.sql.
1.5.1 – 8 October 14
Facebook comments on property
Featured icon
Ownership filed added
Views counter on property details and results
Rent inc., Rent excl. prices field added
Reviews pro (agent & admin) and Additional module support for user reviews
Persian language added (For Iran, Afganistan, Tajikistan), Thanks to Amin T.
Russian translation updated, Thanks to YRIX
Arabic language added, Thanks to Bassam A.
RTL improvements, Thanks to Amin T.
DB update debug table
Populated enquire form fields based on session
Validation on languages improved, show language
Edit profile for frontend users
Showroom on sitemap improvement
Fix, Captcha sometime returns wrong captcha
Fix, Few small fixes, for rent prices on homepage
Update instructions from 1.5.0: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.5.1.sql.
Please don’t forget to make a backup!
1.5.0 – 16 August 14
Google AdSense support added in Admin, earn additional money with your website
PayPal payment for featured, earn more extra money!
Facebook login
Carousel slider improvement with thumbnail image
Backup module added, for images and database
Inovative results filtering on homepage
MyMemory and Google free translation API integrated for translation language files
Category ‘Distances from’ examples added (Beach, Train, Metro, Bus, Pharmacies, Bakery, Restourant, Coffee shop…)
Amenities categorized example to Indoor/Outdoor amenities
Field Floor added as new example for option
Currency and other fields now can be prefixed also… (for pounds etc…)
Print version added on view property
Additional Agents listing page template example
Cash option / Withdrawal payment added, after payment admin can activate property manually
Agencies example added to homepage, bottom
Main menu beginner version with more left menu items in administration
icons added in edit property for frontend and backend
Prices for featured listing and activation available on registration/login page
Added flag icon in frontend languages menu
On one language pages, menu is now hidden
Custom map and black design added to demo as default
Latest articles/news/blog posts added to homepage example
Add prefix for options
Map added on slideshow bottom
Icons added to results listing
page_featured.php prices example added
Validation for dropdown option added (same number of values for each language)
Logo in footer definition moved from css to HTML , so easily can be detected and changed…
Watermark on ads and slideshow module removed and disabled size restrictions
Profile and Property page, now agents estates are ordered from newest…
Copy to all languages feature improvements (Copy numeric and empty values)
cms_config.php new parameter, $config[‘disable_responsive’] = TRUE;
Update instructions from 1.4.9: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.5.0.sql. Additional, you should copy facebook.php to your ?/application/config? folder
Please don’t forget to make a backup!
1.4.9 – 19 July 14
Hotfixed, collapse menu added
PayPal payment feature for property/listing activation, monetize your website now!
Captcha on frontend forms
Agent profile page
Forget password feature
Order by price in results
Private pages, for logged users only, Thanks to S. Lopez!
Agents pagination and search feature included
Listing expiry date added
Purchase code checker added to configurator script
Featured properties now have border and colored address in results
Articles/News/Blog SEO uri-s
Gallery added to ‘page_homepage.php’
File repository added to property view
Admin search, show not_activated warning now
Properties on same address gmap view improvement
Menu item without link feature added, just enter ’#’ into keywords of wanted page
Upload images watermark issue with small images fixed
Quote in title characted issue fixed for new added properties
Non-responsive template version removed
Few minor fixes and improvements included
cms_config.php new parameter, $config[‘cookie_warning_enabled’] = TRUE; // For EU countries
cms_config.php new parameter, $config[‘custom_map_center’] = ‘27.175015, 78.042155’; // For fixed map center
cms_config.php new parameter, $config[‘show_not_available_amenities’] = TRUE;
cms_config.php new parameter, $config[‘all_results_default’] = TRUE; // To show all results on homepage by default, no purpose selected
cms_config.php new parameter, $config[‘reactivation_enabled’] = TRUE; // Property must be activated again after changes
Update instructions from 1.4.8: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.4.9.sql.
Because of purchase code checker, you must add following to your ‘applicationconfigcms_config.php’:
$config['codecanyon_username'] = 'your_codecanyon_username'; $config['codecanyon_code'] = 'your_purchase_code';
Where to find purchase code?
If you using customized template without captcha, then you need add $config[‘captcha_disabled’] = true; in your ‘applicationconfigcms_config.php’
1.4.8 – 21 May 14
Frontend listings change order from publish_date ASC to DESC
My location button feature on Google Map
Dutch translation added, Thanks to Floris w.!
Add embed video field added
seo-godaddy.htaccess added
robots.txt example added
Customization on purple theme example
Custom Map translation added
URL transitions for few new languages added: Czech, Mongolian, Ukrainian, Belorussian, Russian, Thanks to Dima!
Hidden pages, not visible in menu
Fixed, Zoom images on iPad mini
Fixed, Homepage slideshow pagination
Fixed, address characters on contact page error cause map crash
Fixed, Agent can become admin
Fixed, pagination sometimes show plain JSON
Update instructions from 1.4.7: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.4.8.sql.
1.4.7 – 21 April 14 (Hotfixed)
Additional Color variation theme examples (Orange, Purple, Black) with demo preview
Articles page type added with template example
Custom map style example added in, ‘templatesbootstrap2-responsivecomponentshead.php’ —More custom maps can be found on http://snazzymaps.com
Clickable cluster event added to cluster config
RTL test added to live demo, http://iwinter.com.hr/real-estate/index.php?test=rtl
seo-v2.htaccess mod_rewrite configuration added
When all options are not translated, dropdown’s doesn’t work, fiexd
Email export file spaced in Windows notepad, fixed
Hotfixed:
Agent interface, show just agent properties
Blank screen on some localhost installations
Update SQL script issue
Update instructions from 1.4.6: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.4.7.sql.
1.4.6 – 6 April 14
3 Color variations theme examples (Red, Green, Blue) with demo preview —If you want to specify color, in ‘application/config/cms_config.php’ add line $config[‘color’] = ‘red’;
Beta frontend RTL support (If someone knows well RTL, please let me know)
Template parameter added is_rtl…/is_rtl for RTL customization in template
Search query added, example: http://iwinter.com.hr/real-estate/index.php?search=zagreb
URI characters transformation, added for turkish language.
Featured properties template example added
Hidden amenities category added
Property options values_correction validation added, when user enter spaces
Language admin translation fixed for $ character
Update instructions from 1.4.5: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.4.6.sql.
1.4.5 – 23 March 14
Clustering, Map InfoWindow AutoPan, Draggable now configurable in responsive theme
Login link added
SMTP configuration added to ‘applicationlibrariesMY_Email.php’
configuration to change URI ‘property’->’listing’: – Add $config[‘listing_uri’] = ‘listing’; to cms_config.php
External link supported now, you just need to add page to menu and your link with ‘http’ included to keywords
Featured properties listing on top of results now
Footer and Header template saparated
DateTimePicker translation added
GPS data format validation added
Rename ‘Visible in frontend’ => ‘Visible in frontend submission’.
Simplify badget translations, just images in badgets folder
Performance issue on edit property when you have >=100 options on >=3 languages improved…
Generate_sitemap fix and performance improvements…
Enquire message length limitation removed
Opera Browser responsive menu fix
Login failure in rare situations (after 2 hour of inactivity) fixed
Update instructions from 1.4.4: extract all files except ?/files? folder and ?/application/config? folder and update database, in phpmyadmin select database and import update-1.4.5.sql. There are few new fields in frontend translation files, so you need to translate this new fields for your language.
1.4.4 – 9 March 14
German language pack added. Thanks to Sassun Mirzakhanyan!
“Changes are saved” message added when saving properties/pages in admin and frontend.
Email alerts on new not actiated property from user
Facebook/social code embed in admin
Selected property change icon to red color
Homepage show first option purpose results, and not “Sale” based on template name
Watermark support for specific images format
Update instructions from 1.4.3: extract all files except ”/files” folder and ”/application/config” folder and update database, in phpmyadmin select database and import update-1.4.4.sql
1.4.3 – 3 March 14
Responsive Frontend demo template example!
Language file translation feature now available in admin, no more file editing!
Fullscreen Map template example
Activate/deactivate all user properties feature in administration
Tag estate_data_icon added for property template
InfoWindow added to property map, with GPS and address
Route suggestion added to property
Marker icon based by property type in Admin
Noreply email added to settings
Frontend zoom parameter added to settings
Admin estates and users pagination, default 20 per page
Frontend results loading indicator, and effect slideEffect removed
Tag featured_properties…/featured_properties added to template
CSS icons height fix in general amenities
General amenities and property title in results, fixed height defined in CSS
Options problems with order fixed
Hotfix:
Turkish language files added, thanks to Turan Ta?k?n Sabah!
Hidden languages not visible in sitemap (Please save any page, just for sitemap update)
Gallery image blueimp script updated to new version
Few iOS7 Safari issue fixed
Spanish translation added, Thanks to Luis Eduardo Miralles!
Map just remove markers if no results on search, no change of location.
Slideshow responsive improvement
Responsive menu improvement for small devices
Available languages listing when adding new language
Few mini-fixes/mini-improvements in frontend and backend
hash function detection improvements fur server that doesn’t support hash function
Language edit limitation to hide all languages (One must always be visible)
Language edit fix for unique language detection
Russian language pack added, Thanks toAndrew!
Search properties near wanted addres
Update instructions from 1.4.2: extract all files except ”/files” folder and ”/application/config” folder and update database, in phpmyadmin select database and import update-1.4.3.sql
1.4.2 – 24 February 14
Map Location Marker for property type added
Auto-suggest for County, City, Zip (List only available)
Refresh map markers based on search results, also can be disabled ( var mapRefresh = false; )
Icon examples added to property amenities
Auto-resize normal-size images to 1024×768
Sitemap generator improvements
Improvement in auto-tab selection by title ( Sale and Rent example provided, user asks for Newlunches )
Disable auto-drag on map example, in customsearch template file
Links Back to web-page / admin-interface
Hard lock for options implemented, for elements that should not be removed
has_page_images…/has_page_images integrated to template
Upload progressbar css improvement
GoDaddy fix for delete images
Translation for email subject added
Few mini-bugs fixed and mini-improvements in backend and frontend
For amenities if tag exists, has_option_#…/has_option_#
Update instructions from 1.4.1: extract all files except ”/files” folder and ”/application/config” folder and update database, in phpmyadmin select database and import update-1.4.2.sql
1.4.1 – 18 February 14
Auto-search when click on property purpose (Rent, Sale, …), example added to page_customsearch.php
Option locked feature (For options that requiring template customisations)
Option Frontend visible feature (For options that will be hidden on frontend submission)
Button for copy data (dropdown, checkboxes) to other languages if you want this
Server that doesn’t support HTTP DELETE method issues, fixed
“application” and “system” folder outside default path now supported, for security
Database port added to configurator
Contact form ‘settings’ issue fixed
Add language, validation-improvement
Few bug fixed and mini-improvements in backend, frontend and sitemap
Update instructions from 1.4: extract all files except ”/files” folder and ”/application/config” folder and update database, in phpmyadmin select database and import update-1.4.1.sql.
1.4 – 12 February 14
Drop-down search-field for category General amenities template example, page_customsearch.php
Search tab manipulation-example added to template example, page_customsearch.php
Export user list feature in administration, can be used for insert/import to newslatter script like MailChimp
Added template parameters (last_estates_num, array last_estates) and template example to show last 3 added
properties, page_customsearch.php
“short_open_tag=On” is no longer necessary
Update from jQuery-1.8.2 to jQuery-1.8.3, fix frontend issues in Opera Browser.
Page visual editor height in “code mode” issue fixed
Few bugs in backend and frontend fixed, when adding new property and no agent is selected, changing language in property, language files missing errors
Configurator improvements, check for writable files/folders
Update instructions from 1.3: extract all files except ”/files” folder and ”/application/config” folder.
1.3 – 8 February 14
URI optimization, from “frontend/property/” to “property/“
Logo link url issue fixed
Hidden date-range in admin for non-rental properties now is empty
not hidden, because it can be usable if admin/agent want to edit enquire->change property that can be rentable
Zip code example added, searchable
Search filter improvements for numerical values, examples for Max price, Min price, Bathrooms, Bedrooms
No more jQuery customization needed for new standard search fields, just add it to form by HTML
Checkbox support and example added to search-form
Added template parameters (options_values_li_#)
Admin dashboard design improvements for non-validated properties label
Admin map not showing all properties error fixed
Search form HTML template moved to components
Android 4.x HTML fix for h2 tags
General amenities that is not available show with X, instead of hidden
Frontend JS optimisations
1.2 – 3 February 14
Email validation for Enquire form in frontend property
Language problem with url fixed
#.Uu4ba_tklH8 removed from URL in theme example
Google maps translated based on lang_code added to theme example
IE8 issue with frontend map fixed
Database Host and Database Driver added to configurator
1.1 ? 28 January 14
Property Sale and Rent in same time example
Option suffix field, usage example for currency, area etc…
Added template parameters for suffix (options_suffix_#, category_options_#->option_suffix, has_option_#, is_purpose_rent, is_purpose_sale)
Example with more currency used, price for rent and sale
Different price for sale and rent
New, sold, action badget added to theme example
Configurator security fixes (Old passwords after update will not work!)
For rental purpose, check_in / check_out date fields in Enquire form.
Energy efficiency field added to theme example
Front end submition with activate feature for admin (alpha version)
1.0 ? 17 January 14
Initial release
Thanks!
If you enjoy this application please rate & share it! If you are rating it with less than 5 stars please drop me a mail why it didn?t achieve a full score and what could be improved in your opinion.
Counter
Voir sur Codecanyon
Real Estate Agency Portal
0 notes
Photo

Online Chmod Calculator | Free & Easy To Use Converter
CHMOD Calculator is a free that lets you check boxes which tell you what number to use to CHMOD a file for access. Try it right now.
URL: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod calc#chmod mode calculator#linux chmod calculator#unix chmod calculator#use chmod calculator#chmod calculator free#Convert For free#chmod code generator#chmod calculator 4 digit#actual chmod calculator#easy to use chmod calculator
0 notes
Text
CONVERT FOR FREE- THE BEST SITE FOR RELIABLE CHOMAD CALCULATORS!

This site can be used to convert or calculate almost anything. Finding a specific conversion is attainable with its on-site search. Easy to use on all platforms and browsers with a simple and straightforward interface, online conversion is a mobile-friendly site. It has conversions sorted in categories and alphabetical order. Helpful in everything from calculating the exchange rate of currency to finding the day of a specific date to figuring the Chmod code and more are the uses of this site. It is a useful site which is easy to use for everyone.
Contact US
Email: [email protected]
url: http://www.convertforfree.com/chmod-calculator/
Hit the follow button and get in touch.
#chmod calculator#Chmod Command Calculator#free chmod calculator#chmod calc#chmod mode calculator#online#convert#converter#Online Calculator#convert for free#chmod calculator free#Online free Calculator#linux permissions#linux chmod calculator#chmod calculator 4 digit#digital chmod calculator
0 notes
Text
Online Chmod Calculator | Free & Easy To Use Converter

CHMOD Calculator is a free that lets you check boxes which tell you what number to use to CHMOD a file for access.
Try it right now: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#Chmod Command Calculator#free chmod calculator#chmod calc#chmod mode calculator#convert#convert for free#converter#Online Calculator#Online#chmod calculator online#Online free Calculator#Smart Conversion
0 notes
Photo
Convert For Free- Best Solution For Chmod Calculator
This website provides an easy-to-use interference. Make your task a piece of cake by visiting Convert For Free! Access the best Chmod Calculator in just a few clicks!
Try right now: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#Chmod Command Calculator#free chmod calculator#chmod calc#chmod mode calculator#convert for free#chmod calculator free#Online free Calculator#Online Calculator#linux permissions#chmod calculator online#chmod permissions#calculator
0 notes
Photo
This site can be used to convert or calculate almost anything. Finding a specific conversion is attainable with its on-site search. Easy to use on all platforms and browsers with a simple and straightforward interface, online conversion is a mobile-friendly site. It has conversions sorted in categories and alphabetical order. Helpful in everything from calculating the exchange rate of currency to finding the day of a specific date to figuring the Chmod code and more are the uses of this site. It is a useful site which is easy to use for everyone.
Use right now: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#Chmod Command Calculator#free chmod calculator#chmod calc#chmod mode calculator#convert for free#chmod calculator free#Online free Calculator#Online Calculator#chmod calculator online#linux permissions#chmod permissions#calculator#calculate
0 notes
Photo

Convert For Free- Best Solution For Chmod Calculator
This website provides an easy-to-use interference. Make your task a piece of cake by visiting Convert For Free! Access the best Chmod Calculator in just a few clicks!
Check instant http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod calc#chmod mode calculator#linux chmod calculator#Convert For free#chmod calculator free#Online Calculator#chmod calculator online#chmod permissions#unix permissions chart
0 notes
Text
Learn More About The chmod Calculator and Its Uses

What is the chmod calculator?
Chmod Calc is a free tool that has made the complicated tasks easy. The online Chmod Calculator is used to compute the symbolic or octal value for a series of files in Linux servers. Chmod is the real system and command calls for the Unix-like operating software. It can alter the access permissions to file system objects. Chmod calc can also change special mode flags. Umask is responsible for treating this request. As the name is a mere abbreviation of change mode, it can be classified as Unix permission calculator.
Facts about the chmod calculator:
AT&T Unix version 1 is where the first chmod calculator 4 digits first conjured. Chmod example includes chmod777 and chmod755 both of which have proved vital to programmers and IT experts.
Applications of chmod calculator:
• Chmod command is primarily used to change file/ directory mode bits or Linux permissions.
• By clicking on the chmod mode calculator, you can make a file ''read only''. This means you provided read permissions to only the ''owner''. Hence, the permission is not granted to ''group'' & ''others''. The octal representation for this is 400.
• Contrary to this, the option of ''all permission'' grants the permission for all. This includes the groups and users. Linux permission calculator performs this command
• You can use the chmod calculator 4 digit to remove the file permission. To vanish the permissions click on ‘-‘ symbol instead of the ‘+’ symbol in the chmod calc.
• The Unix permission calculator may also be utilized in removing file permission by the use of octal mode command. Let’s take a look at a case. If a file ‘A’ has permissions 755, you have to remove 7 of a user to 5.
• The Chmod Calc proves very handy. It can remove the write and read access from files for all with the symbolic directory name.
• Moreover, you can also set special permissions specifically on directories. This can be done without touching files. For this purpose, use option ‘X’ instead of ‘x’ since ‘x’ will give permission to both the files/directories.
• You can benefit from the Unix permission calculator and copy permission from one file to another in Unix.
• Lastly, multiple permissions can be changed whether it is a file, a directory or any other important document.
Try for free
How does a chmod calculator work:
A chmod calc is comprised of three classes which jointly participate in helping this tool not only function but also flourish in its filed. These are:
1. Chattr- command used to alter characteristics of a file or directory on Linux systems.
2. Chown- command used to change the owner of a file or directory in the Unix system
3. Chgrp- command used to alter the group of a directory or file on a Unix system.
Convert For Free- the best chmod calculator website:
Visit: http://www.convertforfree.com/chmod-calculator/ Click on the link above and master the art of programming like millions of other users of our free chmod calc. Quick and reliable results are our specialty. Office work or personal business, our free chmod calculator, provides you with the most exceptional service available. So hurry up and turn your lives around. Start using our tool now!
#chmod calculator#free chmod calculator#chmod calc#chmod mode calculator#linux chmod calculator#chmod calculator free#Convert For free#Online Calculator#chmod calculator online
0 notes
Photo
Convert For Free- Best Solution For Chmod Calculator
This website provides an easy-to-use interference. Make your task a piece of cake by visiting Convert For Free! Access the best Chmod Calculator in just a few clicks!
Try our software: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod calc#chmod mode calculator#linux chmod calculator#chmod calculator free#Convert For free#Online Calculator#chmod calculator online#chmod permissions#unix permissions chart
0 notes
Text
CHMOD CALCULATOR- THE NEW TREND! | OnvertForFree

Why Chose Chmod Calculator?
Chmod Calculator is a tool for finding the numeric or symbolic value for a set of file or folder permissions in Linux server. It has three compulsory columns
1) Owner
2) Group
3) Other
Also, it has three modes:
1) Read
2) Write
3) Execute.
Another optional column is superuser. This column denotes the special setuid, setgid and sticky flags. Chmod Calculator possesses two modes of usage, one is symbolic and the other absolute. Symbolic allows you to remove, add, or set a particular mode while having other modes unchanged. This is achieved by using operators and letters. But, in absolute mode, you can overrule the existing permission with a new value. This new value is a three digit number. Chmod Calculator 4 digits allowed four-digit codes, as well.
use right now : http://www.convertforfree.com/chmod-calculator/
Benefits OF CHMOD CALCULATOR
Chmod Calculator generates the code which is readable, writeable and executable by everyone. Generally, Linux permission users face problems such as not being able to upload a file or modify a document due to not getting permissions. To overcome this, the Webmaster would need to change the Chmod code. Unix systems have a file control mechanism which decides who can access a file or a folder and what they can do to it. Fine control mechanism has two parts: "classes" and "permissions" which determine who can access the file and how respectively. Unix permission users can also use this. Hence, obtain the online chmod calc today!
How to use CHMOD CALCULATOR
The Chmod Calculator has three classes, namely, owner, group and other. Owner is the creator of the file. Group, whereas, contains a bunch of users sharing similar permissions and user privileges. Other, however, symbolizes the general public. This calculator has three permissions which go as read, write and execute. Read indicates the action of merely viewing the file and being unable to modify it. When applied to a folder, one can't delete or modify any files in it, but they can view it. In the write, you can edit or modify files and for the folder, remove or add files to it. Execute is mostly accessed when there is a need to run a file. Combining the classes and permissions will allow you to control who can access the data and what they can do to it. Chmod examples are various in numbers and can be used according to need. Chmod Calc is, therefore, a widely used calculator. Likewise, Chmod Mode Calculator allows you to access Linux permission calculators. Chmod Calc can also aid Unix Permissions Calculators!
Why OPT FOR CHOMAD CALCULATOR
Chmod Calculator makes your life as a webmaster easier. Go use it now to make it easier for you to read, write and execute.
CONVERT FOR FREE- THE BEST SITE FOR RELIABLE CHOMAD CALCULATORS!
This site can be used to convert or calculate almost anything. Finding a specific conversion is attainable with its on-site search. Easy to use on all platforms and browsers with a simple and straightforward interface, online conversion is a mobile-friendly site. It has conversions sorted in categories and alphabetical order. Helpful in everything from calculating the exchange rate of currency to finding the day of a specific date to figuring the Chmod code and more are the uses of this site. It is a useful site which is easy to use for everyone.
use right now : http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod calc#chmod mode calculator#linux chmod calculator#Convert For free#Online Calculator#chmod calculator online#chmod permissions#unix permissions chart#chmod number calculator
0 notes
Text
CHANGE FILE PERMISSIONS EASILY WITH ONLINE CHMOD CALCULATOR | Convert For Free

WHAT IS CHMOD AND CHMOD CALCULATOR
Operating systems like those of Linux and Unix have a set of rules. They determine file access priorities. It rules out who can access a particular file and how freely they can access it. Such commands or access rules are known as file permissions. The command that can reset the file permissions is called chmod. It is short for ‘change mode.’ It is a type of command computing and also a system call for Linux and Unix-like systems. It changes file permissions to file objects or directories. They can be prioritized between the user, group, and others.
User, group and others are three classes of users. The owner of the file objects is known as the ‘user.’ The group means the members of the group owning that file. Others or public are anyone other than the two categories which can view the file.
Try right now
Convert for free chmod calculator is a Linux permissions calculator. It is a chmod calculator four digits and is trusted by many. It generates values in octal or symbolic figures. The codes change file permissions. Octal characters are numbers, and symbolic or alphanumeric includes both letters and digits. The chmod mode calculator calculates octal or alphanumeric codes for users. The generated codes can then be applied to relevant files. Chmod calc provides an easy solution to users online, free of cost to change file permissions.
HOW TO USE THE CHMOD CALCULATOR 4 DIGIT
Convert for free has an easy, simple to use chmod calculator. Generating codes is quick. Here is a guide on how to use this:
● It has three mandatory formats
○ They include read, write and execute.
● It has three columns. a fourth special addition being a Unix permissions calculator as well
○ They are the owner, group, and others. The special feature is a superuser column. It helps to point out the stupid, setgid, and sticky flags. It is a unique feature.
● The chmod calculator has two modes provided to all users worldwide.
○ They are
■ Symbolic mode: It allows users to utilize operators and alphabets. Setuid, setgid, and sticky flags. It meanwhile also enable them to leave remaining modes unchanged. The symbolic mode allows users to add, delete or set particular modes.
■ Absolute mode: it kets all users to override the current file permissions. And re-write it completely. It lets users calculate a new three-digit unit.
CHMOD EXAMPLE: WHY CHMOD CALCULATOR IS THE BEST
A few common octal and alphanumeric chmod examples are:
664 or -rw-r--r-- web content and pictures viewed by surfers.
666 or -rw-rw-rw- This symbolizes the log files or pages.
755 or - rwxr-xr-x perl scripts to make them executable.
One of the many benefits of this chmod calculator is that it is free of cost and available online. To all of its users, it has helped make file permissions easier to change. It is open to anyone that needs it online. It is quick to use and generates codes in seconds. Get coding with chmod calculator today!
Convert For Free- Best Solution For Chmod Calculator
This website provides an easy-to-use interference. Make your task a piece of cake by visiting Convert For Free! Access the best Chmod Calculator in just a few clicks!
Website: http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod mode calculator#chmod calc#linux chmod calculator#chmod calculator free#Convert For free#unix chmod calculator#chmod code generator#chmod number calculator#chmod calculator online#chmod command calculator#unix permissions chart#chmod calculator 4 digit#use chmod calculator
0 notes
Text
CHANGE FILE PERMISSIONS EASILY WITH ONLINE CHMOD CALCULATOR

WHAT IS CHMOD AND CHMOD CALCULATOR
Operating systems like those of Linux and Unix have a set of rules. They determine file access priorities. It rules out who can access a particular file and how freely they can access it. Such commands or access rules are known as file permissions. The command that can reset the file permissions is called chmod. It is short for ‘change mode.’ It is a type of command computing and also a system call for Linux and Unix-like systems. It changes file permissions to file objects or directories. They can be prioritized between the user, group, and others.
User, group and others are three classes of users. The owner of the file objects is known as the ‘user.’ The group means the members of the group owning that file. Others or public are anyone other than the two categories which can view the file.
Try for free http://www.convertforfree.com/chmod-calculator/
Convert for free chmod calculator is a Linux permissions calculator. It is a chmod calculator four digits and is trusted by many. It generates values in octal or symbolic figures. The codes change file permissions. Octal characters are numbers, and symbolic or alphanumeric includes both letters and digits. The chmod mode calculator calculates octal or alphanumeric codes for users. The generated codes can then be applied to relevant files. Chmod calc provides an easy solution to users online, free of cost to change file permissions.
HOW TO USE THE CHMOD CALCULATOR 4 DIGIT
Convert for free has an easy, simple to use chmod calculator. Generating codes is quick. Here is a guide on how to use this:
● It has three mandatory formats
○ They include read, write and execute.
● It has three columns. a fourth special addition being a Unix permissions calculator as well
○ They are owner, group, and others. The special feature is a superuser column. It helps to point out the setuid, setgid, and sticky flags. It is a unique feature.
● The chmod calculator has two modes provided to all users worldwide.
○ They are
■ Symbolic mode: It allows users to utilize operators and alphabets. Setuid, setgid, and sticky flags. It meanwhile also enable them to leave remaining modes unchanged. The symbolic mode allows users to add, delete or set particular modes.
■ Absolute mode: it kets all users to override the current file permissions. And re-write it completely. It lets users calculate a new three-digit unit.
CHMOD EXAMPLE: WHY CHMOD CALCULATOR IS THE BEST
A few common octal and alphanumeric chmod examples are:
664 or -rw-r--r-- web content and pictures viewed by surfers.
666 or -rw-rw-rw- This symbolizes the log files or pages.
755 or - rwxr-xr-x perl scripts to make them executable.
One of the many benefits of this chmod calculator is that it is free of cost and available online. To all of its users, it has helped make file permissions easier to change. It is open to anyone that needs it online. It is quick to use and generates codes in seconds. Get coding with chmod calculator today!
Convert For Free- Best Solution For Chmod Calculator
This website provides an easy-to-use interference. Make your task a piece of cake by visiting Convert For Free! Access the best Chmod Calculator in just a few clicks!
Try for free http://www.convertforfree.com/chmod-calculator/
#chmod calculator#free chmod calculator#chmod calculator free#Convert For free#chmod calc#chmod mode calculator#linux chmod calculator
0 notes
Photo
New Post has been published on https://www.techy360.com/2017/11/29/linux-bash-script-step-step-guide/
Linux Bash Script Step By Step Guide , You Will Love It
Today we are going to talk about bash scripting or shell scripting and how to write your first bash script. Actually, they are called shell scripts in general, but we are going to call them bash scripts because we are going to use bash among the other Linux shells.
There are zsh, tcsh, ksh and other shells.
In the previous posts, we saw how to use the bash shell and how to use Linux commands.
The concept of a bash script is to run a series of Commands to get your job done.
To run multiple commands in a single step from the shell, you can type them on one line and separate them with semicolons.
pwd ; whoami
Actually, this is a bash script!!
The pwd command runs first, displaying the current working directory then the whoami command runs to show the currently logged in users.
You can run multiple commands as much as you wish, but with a limit. You can determine your max args using this command.
getconf ARG_MAX
Well, What about putting the commands into a file, and when we need to run these commands we run that file only. This is called a bash script.
First, make a new file using the touch command. At the beginning of any bash script, we should define which shell we will use because there are many shells on Linux, bash shell is one of them.
Bash Script Shebang
The first line you type when writing a bash script is the (#!) followed by the shell you will use.
#! <=== this sign is called shebang. #!/bin/bash
If you use the pound sign (#) in front of any line in your bash script, this line will be commented which means it will not be processed, but, the above line is a special case . This line defines what shell we will use, which is bash shell in our case.
The shell commands are entered one per line like this:
#!/bin/bash # This is a comment pwd whoami
You can type multiple commands on the same line but you must separate them with semicolons, but it is preferable to write commands on separate lines, this will make it simpler to read later.
Set Script Permission
After writing your bash script, save the file.
Now, set that file to be executable, otherwise, it will give you permissions denied. You can review how to set permissions using chmod command.
chmod +x ./myscript
Then try run it by just typing it in the shell:
./myscript
And Yes, it is executed.
Print Messages
As we know from other posts, printing text is done by echo command.
Edit our file and type this:
#!/bin/bash # our comment is here echo "The current directory is:" pwd echo "The user logged in is:" whoami
Perfect! Now we can run commands and display text using echo command.
If you don’t know echo command or how to edit a file I recommend you to view previous articles about basic Linux commands
Using Variables
Variables allow you to store information to use it in your script.
You can define 2 types of variables in your bash script:
Environment variables
User variables
Environment Variables
Sometimes you need to interact with system variables, you can do this by using environment variables.
#!/bin/bash # display user home echo "Home for the current user is: $HOME"
Notice that we put the $HOME system variable between double quotations, and it prints the home variable correctly.
What if we want to print the dollar sign itself?
echo "I have $1 in my pocket"
Because variable $1 doesn’t exist, it won’t work. So how to overcome that?
You can use the escape character which is the backslash \ before the dollar sign like this:
echo "I have \$1 in my pocket"
Now it works!!
User Variables
Also, you can set and use your custom variables in the script.
You can call user variables in the same way like this:
#!/bin/bash
# User variables grade=5 person="Adam" echo "$person is a good boy, he is in grade $grade" chmod +x myscript ./myscript
Command Substitution
You can extract information from the result of a command using command substitution.
You can perform command substitution with one of the following methods:
The backtick character (`).
The $() format.
Make sure when you type backtick character, it is not the single quotation mark.
You must enclose the command with two backticks like this:
mydir=`pwd`
Or the other way:
mydir=$(pwd)
So the script could be like this:
#!/bin/bash mydir=$(pwd) echo $mydir
The output of the command will be stored in mydir variable.
Math calculation
You can perform basic math calculations using $(( 2 + 2 )) format:
#!/bin/bash var1=$(( 5 + 5 )) echo $var1 var2=$(( $var1 * 2 )) echo $var2
Just that easy.
if-then-else Statement
The if-then-else statement takes the following structure:
if command then do something else do another thing fi
If the first command runs and returns zero; which means success, it will not hit the commands after the else statement, otherwise, if the if statement returns non-zero; which means the statement condition fails, in this case, the shell will hit the commands after else statement.
#!/bin/bash user=anotherUser if grep $user /etc/passwd then echo "The user $user Exists" else echo "The user $user doesn’t exist" fi
We are doing good till now, keep moving.
Now, what if we need more else statements.
Well, that is easy, we can achieve that by nesting if statements like this:
if condition1 then commands elif condition2 then commands fi
If the first command return zero; means success, it will execute the commands after it, else if the second command return zero, it will execute the commands after it, else if none of these return zero, it will execute the last commands only.
#!/bin/bash user=anotherUser if grep $user /etc/passwd then echo "The user $user Exists" elif ls /home then echo "The user doesn’t exist" fi
You can imagine any scenario here, maybe if the user doesn’t exist, create a user using the useradd command or do anything else.
Numeric Comparisons
You can perform a numeric comparison between two numeric values using numeric comparison checks like this:
number1 -eq number2 Checks if number1 is equal to number2.
number1 -ge number2 Checks if number1 is bigger than or equal number2.
number1 -gt number2 Checks if number1 is bigger than number2.
number1 -le number2 Checks if number1 is smaller than or equal number2.
number1 -lt number2 Checks if number1 is smaller than number2.
number1 -ne number2 Checks if number1 is not equal to number2.
As an example, we will try one of them and the rest is the same.
Note that the comparison statement is in square brackets as shown.
#!/bin/bash num=11 if [ $num -gt 10] then echo "$num is bigger than 10" else echo "$num is less than 10" fi
The num is greater than 10 so it will run the first statement and prints the first echo.
String Comparisons
You can compare strings with one of the following ways:
string1 = string2 Checks if string1 identical to string2.
string1 != string2 Checks if string1 is not identical to string2.
string1 < string2 Checks if string1 is less than string2.
string1 > string2 Checks if string1 is greater than string2.
-n string1 Checks if string1 longer than zero.
-z string1 Checks if string1 is zero length.
We can apply string comparison on our example:
#!/bin/bash user ="Hello" if [$user = $USER] then echo "The user $user is the current logged in user" fi
One tricky note about the greater than and less than for string comparisons, they MUST be escaped with the backslash because if you use the greater-than symbol only, it shows wrong results.
So you should do it like that:
#!/bin/bash v1=text v2="another text" if [ $v1 \> "$v2" ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
It runs but it gives this warning:
./myscript: line 5: [: too many arguments
To fix it, wrap the $vals with a double quotation, forcing it to stay as one string like this:
#!/bin/bash v1=text v2="another text" if [ $v1 \> "$v2" ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
One important note about greater than and less than for string comparisons. Check the following example to understand the difference:
#!/bin/bash v1=Hello v2=Hello if [ $v1 \> $v2 ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
sort myfile Hello Hello
The test condition considers the lowercase letters bigger than capital letters. Unlike the sort command which does the opposite.
The test condition is based on the ASCII order, while the sort command is based on the numbering orders from the system settings.
File Comparisons
You can compare and check for files using the following operators:
-d my_file Checks if its a folder.
-e my_file Checks if the file is available.
-f my_file Checks if its a file.
-r my_file Checks if it’s readable.
my_file –nt my_file2 Checks if my_file is newer than my_file2.
my_file –ot my_file2 Checks if my_file is older than my_file2.
-O my_file Checks if the owner of the file and the logged user match.
-G my_file Checks if the file and the logged user have the idetical group.
As they imply, you will never forget them.
Let’s pick one of them and take it as an example:
#!/bin/bash mydir=/home/Hello if [ -d $mydir ] then echo "Directory $mydir exists" cd $mydir ls else echo "NO such file or directory $mydir" fi
We are not going to type every one of them as an example. You just type the comparison between the square brackets as it is and complete you script normally.
There are some other advanced if-then features but let’s make it in another post.
That’s for now. I hope you enjoy it and keep practicing more and more.
Thank you.
0 notes
Photo
New Post has been published on https://www.techy360.com/2017/11/29/linux-bash-script-step-step-guide/
Linux Bash Script Step By Step Guide , You Will Love It
Today we are going to talk about bash scripting or shell scripting and how to write your first bash script. Actually, they are called shell scripts in general, but we are going to call them bash scripts because we are going to use bash among the other Linux shells.
There are zsh, tcsh, ksh and other shells.
In the previous posts, we saw how to use the bash shell and how to use Linux commands.
The concept of a bash script is to run a series of Commands to get your job done.
To run multiple commands in a single step from the shell, you can type them on one line and separate them with semicolons.
pwd ; whoami
Actually, this is a bash script!!
The pwd command runs first, displaying the current working directory then the whoami command runs to show the currently logged in users.
You can run multiple commands as much as you wish, but with a limit. You can determine your max args using this command.
getconf ARG_MAX
Well, What about putting the commands into a file, and when we need to run these commands we run that file only. This is called a bash script.
First, make a new file using the touch command. At the beginning of any bash script, we should define which shell we will use because there are many shells on Linux, bash shell is one of them.
Bash Script Shebang
The first line you type when writing a bash script is the (#!) followed by the shell you will use.
#! <=== this sign is called shebang. #!/bin/bash
If you use the pound sign (#) in front of any line in your bash script, this line will be commented which means it will not be processed, but, the above line is a special case . This line defines what shell we will use, which is bash shell in our case.
The shell commands are entered one per line like this:
#!/bin/bash # This is a comment pwd whoami
You can type multiple commands on the same line but you must separate them with semicolons, but it is preferable to write commands on separate lines, this will make it simpler to read later.
Set Script Permission
After writing your bash script, save the file.
Now, set that file to be executable, otherwise, it will give you permissions denied. You can review how to set permissions using chmod command.
chmod +x ./myscript
Then try run it by just typing it in the shell:
./myscript
And Yes, it is executed.
Print Messages
As we know from other posts, printing text is done by echo command.
Edit our file and type this:
#!/bin/bash # our comment is here echo "The current directory is:" pwd echo "The user logged in is:" whoami
Perfect! Now we can run commands and display text using echo command.
If you don’t know echo command or how to edit a file I recommend you to view previous articles about basic Linux commands
Using Variables
Variables allow you to store information to use it in your script.
You can define 2 types of variables in your bash script:
Environment variables
User variables
Environment Variables
Sometimes you need to interact with system variables, you can do this by using environment variables.
#!/bin/bash # display user home echo "Home for the current user is: $HOME"
Notice that we put the $HOME system variable between double quotations, and it prints the home variable correctly.
What if we want to print the dollar sign itself?
echo "I have $1 in my pocket"
Because variable $1 doesn’t exist, it won’t work. So how to overcome that?
You can use the escape character which is the backslash before the dollar sign like this:
echo "I have $1 in my pocket"
Now it works!!
User Variables
Also, you can set and use your custom variables in the script.
You can call user variables in the same way like this:
#!/bin/bash
# User variables grade=5 person="Adam" echo "$person is a good boy, he is in grade $grade" chmod +x myscript ./myscript
Command Substitution
You can extract information from the result of a command using command substitution.
You can perform command substitution with one of the following methods:
The backtick character (`).
The $() format.
Make sure when you type backtick character, it is not the single quotation mark.
You must enclose the command with two backticks like this:
mydir=`pwd`
Or the other way:
mydir=$(pwd)
So the script could be like this:
#!/bin/bash mydir=$(pwd) echo $mydir
The output of the command will be stored in mydir variable.
Math calculation
You can perform basic math calculations using $(( 2 + 2 )) format:
#!/bin/bash var1=$(( 5 + 5 )) echo $var1 var2=$(( $var1 * 2 )) echo $var2
Just that easy.
if-then-else Statement
The if-then-else statement takes the following structure:
if command then do something else do another thing fi
If the first command runs and returns zero; which means success, it will not hit the commands after the else statement, otherwise, if the if statement returns non-zero; which means the statement condition fails, in this case, the shell will hit the commands after else statement.
#!/bin/bash user=anotherUser if grep $user /etc/passwd then echo "The user $user Exists" else echo "The user $user doesn’t exist" fi
We are doing good till now, keep moving.
Now, what if we need more else statements.
Well, that is easy, we can achieve that by nesting if statements like this:
if condition1 then commands elif condition2 then commands fi
If the first command return zero; means success, it will execute the commands after it, else if the second command return zero, it will execute the commands after it, else if none of these return zero, it will execute the last commands only.
#!/bin/bash user=anotherUser if grep $user /etc/passwd then echo "The user $user Exists" elif ls /home then echo "The user doesn’t exist" fi
You can imagine any scenario here, maybe if the user doesn’t exist, create a user using the useradd command or do anything else.
Numeric Comparisons
You can perform a numeric comparison between two numeric values using numeric comparison checks like this:
number1 -eq number2 Checks if number1 is equal to number2.
number1 -ge number2 Checks if number1 is bigger than or equal number2.
number1 -gt number2 Checks if number1 is bigger than number2.
number1 -le number2 Checks if number1 is smaller than or equal number2.
number1 -lt number2 Checks if number1 is smaller than number2.
number1 -ne number2 Checks if number1 is not equal to number2.
As an example, we will try one of them and the rest is the same.
Note that the comparison statement is in square brackets as shown.
#!/bin/bash num=11 if [ $num -gt 10] then echo "$num is bigger than 10" else echo "$num is less than 10" fi
The num is greater than 10 so it will run the first statement and prints the first echo.
String Comparisons
You can compare strings with one of the following ways:
string1 = string2 Checks if string1 identical to string2.
string1 != string2 Checks if string1 is not identical to string2.
string1 < string2 Checks if string1 is less than string2.
string1 > string2 Checks if string1 is greater than string2.
-n string1 Checks if string1 longer than zero.
-z string1 Checks if string1 is zero length.
We can apply string comparison on our example:
#!/bin/bash user ="Hello" if [$user = $USER] then echo "The user $user is the current logged in user" fi
One tricky note about the greater than and less than for string comparisons, they MUST be escaped with the backslash because if you use the greater-than symbol only, it shows wrong results.
So you should do it like that:
#!/bin/bash v1=text v2="another text" if [ $v1 > "$v2" ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
It runs but it gives this warning:
./myscript: line 5: [: too many arguments
To fix it, wrap the $vals with a double quotation, forcing it to stay as one string like this:
#!/bin/bash v1=text v2="another text" if [ $v1 > "$v2" ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
One important note about greater than and less than for string comparisons. Check the following example to understand the difference:
#!/bin/bash v1=Hello v2=Hello if [ $v1 > $v2 ] then echo "$v1 is greater than $v2" else echo "$v1 is less than $v2" fi
sort myfile Hello Hello
The test condition considers the lowercase letters bigger than capital letters. Unlike the sort command which does the opposite.
The test condition is based on the ASCII order, while the sort command is based on the numbering orders from the system settings.
File Comparisons
You can compare and check for files using the following operators:
-d my_file Checks if its a folder.
-e my_file Checks if the file is available.
-f my_file Checks if its a file.
-r my_file Checks if it’s readable.
my_file –nt my_file2 Checks if my_file is newer than my_file2.
my_file –ot my_file2 Checks if my_file is older than my_file2.
-O my_file Checks if the owner of the file and the logged user match.
-G my_file Checks if the file and the logged user have the idetical group.
As they imply, you will never forget them.
Let’s pick one of them and take it as an example:
#!/bin/bash mydir=/home/Hello if [ -d $mydir ] then echo "Directory $mydir exists" cd $mydir ls else echo "NO such file or directory $mydir" fi
We are not going to type every one of them as an example. You just type the comparison between the square brackets as it is and complete you script normally.
There are some other advanced if-then features but let’s make it in another post.
That’s for now. I hope you enjoy it and keep practicing more and more.
Thank you.
0 notes