Kamis, 02 Desember 2010

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

0 komentar :

Posting Komentar

Jangan Lupa Komentar ya