Rename all Files in the Directory

Here is the simple shell script to rename all files in the folder with increasing number. In below example I am going to rename all jpg image with increasing number. #!/bin/bash a=1 for i in *.jpg; do new=$(printf “%04d.jpg” “$a”) mv — “$i” “$new” let a=a+1 done Output: 0001.jpg 0002.jpg 0003.jpg 0004.jpg 0005.jpg 0006.jpg 0007.jpg…

Read More
getting started with FuelPHP

Getting Started with FuelPHP

Getting Started with FuelPHP FuelPHP is a simple, flexible, community driven PHP 5 web framework. It was born out of the frustrations people have with the current available frameworks and developed with support from a community of developers. FuelPHP is extremely portable, works on almost any server and prides itself on clean syntax. Installations:- Follow…

Read More
PHP CURL on Proxy Server

How to use CURL with Proxy

This post will be demonstrating how to use curl with proxy in PHP and Linux command line. What is additional parameter we need to pass while using curl via proxy. So I am starting with proxy configuration in PHP curl. 1) PHP curl with proxy $url = ‘http://localhost/path/to/file.php’; $proxy = ‘127.0.0.2:3128’; $ch = curl_init(); curl_setopt($ch,…

Read More

List Comprehension Tasks in Python

List Comprehension Tasks in Python List comprehension is one of Python’s most powerful and elegant features. It lets you create new lists from existing ones in a single, readable line of code. Basic Syntax # [expression for item in iterable if condition] squares = [x**2 for x in range(10)] print(squares) # [0, 1, 4, 9,…

Read More
Verified by MonsterInsights