Tag Archives: bash

Make screenshot with android and linux .

You need SDK from android website on your linux distro.

Power on your device tablet and you need to connect on your PC.

Enable debug mode on your tablet.

Go to shell linux and on platform-tools folder yoou use this command:

Star your application from tablet and under linux shell use the next command:

If you got some errors like : error: device offline

Just go and set tablet online or from settings set to stay online.

NOTE: if you use some terminal emulator android app then the command screenshot not working.
Use first $ adb shell and then try screenshot
.

Posted in All, Android, Commands, Linux. Tagged with , , , , .

Linux .bashrc to extract many archives

This is just a new function to uncompressing many file like:

.tar.bz2,.tar.gz,.bz2,.rar,.gz,.tar,.tbz2,.tgz,.zip,.Z,.7z

Open .bashrc file from home/user folder.

With your text editor and add the next function on the end of the file.

Open a new terminal. This will work with the new function from .bashrc .

Posted in Bash, Linux, Programming. Tagged with , , .

Simple bash script to create folders, files and images .

How to create a series of directories using a standard format.

Let’s see the result :

Delete all this folder is easy , just use this command:

How to create a series of text files using a standard format.

Let’s see the result :

How to create a series of random GIF images named with the same numbers.

Let’s see the result :

Thank you.

Posted in Bash, Linux, Programming. Tagged with , , .

Simple bash script : scan and convert the image in JPG format.

I use to linux commands: scanimage and convert.

We can see the script below:

Write the script in a text file.Named the script with this name scan.sh.

Run this :

The output will be:

You can use any name for the output. As we see in this example I used firstscan.

Posted in Bash, Linux, Programming. Tagged with , , .

Parsing files and rename …

Sometimes you have to rename files.
This can be tiring when we do it manually.
Command “se” may be helpful in this case.
I’ll take a simple example. I will create a working directory called “work.”

We have to create files with the command:

The result should be :

Try these commands to parse and rename files:

This is just a simple example …

Posted in Bash, Commands, Linux, Programming. Tagged with , , , .