Kamis, 02 Desember 2010

Okay i will to show you how to find file with mp3 type or png type n etc. the script is simple. Lets do it:

  1. find all file with mp3 type. You just type in your terminal ---> find *.mp3
  2. find all file with png type. You just type in your terminal ---> find *.png
  3. find all file with avi type. You just type in your terminal ---> find *.avi

okay, thats very simple. you can modify thats script with your idea. thanks for come in my blog.

=-=-=-=-=
Powered by Blogilo

This tutorial explain you how to make file with lowercase exchange to Uppercase. This is the scenario.

  • We have a file with lowercase in text. in this time, my file name is `aris` where in file have a `cakep` text.
  • I want to text `cakep` in aris file change to Uppercase `CAKEP`

Okay i thinks that's simple scenario, so we already to the script

#!/bin/bash

# Mengambil nama file

echo -n "Enter File Name : "

read fileName

# script ini untuk men-cek apakah file yg di maksud ada

if [ ! -f $fileName ]; then

echo "Filename $fileName tidak ada, cek kembali"

exit 1

fi

# Script untuk melakukan perubahan dari lowwercase ke Uppercase dengan perintah tr

tr '[a-z]' '[A-Z]' < $fileName

in that script i use indonesia language for to explain. but don't worry i have the address of original script. You can follow this address for original script http://www.cyberciti.biz/faq/linux-unix-shell-programming-converting-lowercase-uppercase/

okay thanks for comming

=-=-=-=-=
Powered by Blogilo