How to display unicode characters programatically using shell script

We have one utility in our component which is shell script based for unix. We need to provide nl support for this utility as well.All the different locale messages are stored in properties file in UNICODE format. When we use these messages in our shell script with "env printf" command it works prope ...

How to delete files in UNIX using shell script

I have the following task to perform using shell script.The user will provide a directory name along with a date. The script will delete all the files in the specified directory that was created earlier to that date. Also it should display the number of files that has been deleted.Please help. ...

sql result to csv or excel file using shell script

I need some help from an expert in sybase and shell script. Does anyone know how to save the data from a sql to a csv or excel file using shell script?I can only save the data to a txt file. The problem is that the data in the file are not very readable. So, I want to save the data in a csv or excel ...

Pls. HELP : How can I remove the last line, last char using shell script

I have a file that I need to edit using shell script. The original file looks like this :'123456','234567','456789',This should be the expected output :'123456','234567','456789' <--- ( I just need to remove the (,) in the last line)Do you guys have any idea on how to do this? using an SH or KSH ...

how to copy data using shell script to a excel file

Can any one tell me how to copy data using shell script to a excel file from text file to other columns of excel file,leaving first column unaffected i.e it should not overwrite data in first column.Say my text file data is:15-dec-2008 15-dec-200916-dec-2008 16-dec-2009say my first excel column is:c ...

Edit a file using shell script

I want to replace a word in a text file (file.txt) using shell script. The contents of the file are:file.txt--------------line one goes hereline two is hereand so on........I tried following command for replacing a text:Code: ...

How To Kill Java Applications using Shell Script

Using shell script I'm running two java applications at background.The output of 'ps -ef' is UID PID PPID TTY STIME COMMANDAmar 2388 1 con 15:35:58 /usr/bin/bashAmar 1272 1 con 15:44:29 /cygdrive/c/Program Files/Java/jdk1.6.0_01/bin/javaAmar 3972 1 con 15:44:55 /cygdrive/c/Program Files/Java/jdk1.6. ...

Ubuntu \tmp clearing every boot using shell script

how to clear \tmp file in every boot using shell script. please help me ...

Ubuntu Updating etc hosts file using shell script fails

Hi, I'am trying to edit /etc/hosts file of some machine using shell script.This following script works with a temporary file, but testing against /etc/hosts file instead of /home/hadoop/hosts/hosts fails, I'm getting permission denied error.. like ****sed: couldn't open temporary file /etc//sedegcf3 ...

Oracle Delete backup files using shell script

I have to delete previous month backupfiles like sample.ttp-04-24-06 file from directory called 0424. Like that I need to delete the whole month files by using shell script.Please I will run this script once in a month. So it will delete all previous month's backup files which are available in the d ...

Oracle how to create database using shell script

haihow to create database using shell script ...

Oracle passing flexfield from report wrapper to seeded report using shell script

I am unable to pass flexfield values from report wrapper to seeded report using shell scriptbelow is the shell script that i am using to transfer GL Account High and GL Account Low to the seeded program Receipt Journal Report (ARXRJR). the flex fields get passed through the parameter v_param_12 and ...

Oracle how to pick a message from a mail box using shell script

HiCan any one tell me how to pick a message from a mail box using shell script. ...

Oracle Finding largest occurance using shell script.

How to find the largest occuring number in a file using shell script.Please help me to find this out.ex:--file a.txt has 4 numbers 1,2,3,1 ---> output should print "1" as it is present two times. ...

Oracle How to get ORA errors in alertlog file using shell script.

Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script. ...

Logging into a page automatically using shell script.

My college has Cyberoam software installed at the server. So, we need to visit its page and login there before we can use the internet. The problem is that we need to keep the page of Cyberoam (into which we logged in) open. If we close that then our net won't work. The Cyberoam page seems to refres ...

CopyRight symbol printing using shell script

I am having a problem. I am trying to print the copyright symbol using echo command. But the copyright symbol should be placed in an xml tag. For instance this is my shell script codeecho "<string>""3.15," © "Copyright 2008 My company Inc. All rights reserved." ...

command to telnet console using shell-script

i have written a shell-script which logs onto a mail-server using telnet and then tries to send the HELO command. The code for the same looks something like this:exec telnet 150.236.18.66 25;echo "HELO";The problem is that though the telnet connection is established the "HELO" co ...

Using Shell Script how to send mail automatically

Problem: Send mail is configured in my system and now i want to write a shell script using which i can send mail to my rediffmail account.Its little urgent & i will be very thankful if someone send me the code.regards,Sanjeev Kumar(sanju456@rediffmail.com) ...

need to create 1000's of directories using shell script

I need to create thousands of directories in a single parent directory using shell scripting code. One problem would be to generate the unique directory name for each of the 1000 iterations to create a directory every time. ie first time the directory name needs to be subdir1 and then subdir2 for th ...

EventHandler using Shell script

I try to make a system where client can send their sms (contained contact file in it that compressed) to server using sms gateway concept. In this case, server must handle 3 condition : registration, request sending file to server (by client), and request take file in server (by client, and server w ...

Using shell script information for a dropdown menu

What I am trying to do is use to retrieve information from a .txt file and use it in a drop down menu. I am using Cgi and not sure exactly how you do it. This is the shell script that will abstract the information I need for the drop down menuGrep “^[A-Z]” world95.txt | head -261 | tail -257some ...

Watching a Directory using shell script

1)I want to watch a directiory in unix using a shell script.2)In case any change happens to any of the files inside thate.g new file creationor new directory creationor any file modificationwe need an automated mail.3)Mailing part i will take care4)on the part of scheduling we can using any schedule ...

Oracle Problem-Report generation using shell script

HiWe have the Production database and the Reporting database (copy of Production database),both on Oracle 9.2.0.5 and Solaris 5.8. There is a package inside the Oracle database, which extracts some data from inside the database, and would generate a report. A shell script has been created in Solaris ...

Oracle moving files into directory using shell script

Can someone tell me how I move files into directory using *nix/linux shell script?I have files which created from stored procedures using utl_file. The files name for example:DKH_104_12345DKE_101_42324242DKH_102_32432DKE_101_34553Then I create directories automatically for example:/oradata/apps/dmp/ ...

Oracle How to schedule a stored proc with crontabutility using shell script

Can anyone help me out how to write a shell scriptto call a schedule job using crontab utility.I want to call a .sql file in crontab and that must be placed in a shell.How to call & how to execute shell.Loooking forward to hear from u. ...

Oracle Running Plsql procedure using shell script

All,I have to generate reports weekly by using a plsql procedure.For Exapmle : My Proc name is Weekly_report(i number).Here i is the argument for which i need to run the proc 7 times as followsexec weekly_report(1)exec weekly_report(2)exec weekly_report(3)exec weekly_report(4)exec weekly_report(5)ex ...

Ubuntu using shell script to EOF (control + d)?

I am trying to write a shell script that will write a bunch of "at commands" to schedule some tasks (there are changing times, so I am using "at" instead of "cron jobs"). For example, if in my shell script I write:at 12:04mplayer something.mp3and if I execute this, the ...

put mysql query result into a flat file using shell script

I am writing a shell script in which I want to redirect the output of a mysql query result into a file. I have experimented with a sample help I got from the web but did not help :#!/bin/shmysql --user=root --password=ibj -h localhost <<!!USE mydb;SELECT * FROM shino WHERE dbflag=0;quit!!Actua ...

Ubuntu Remove directory with space in name using shell script

I have my shell script to remove an empty directory on the desktop. When I try to remove a folder named Beef 2 it doesn't work. Here is the output (I copied my shell script to /bin so I an execute it by simply typing "rd" an not "./rd"mpg@MIKED6:~$ rdName of directory to remove - ...

Reading a mail using shell script

Can any one guide me on how to read a mail using shell scripting. ...

How to connect to mysql using shell script?

I am new to shell script and really help. I need to connect to MySQL and do some proccessing. How can i do that? ...

reading data from excel using shell script

I need to write a shell script that reads each row of an USER_ID colume in a excel file. the excel has around 10000 rows of data.Can someone gives me some advice what's best way to do this ...

Connecting to oracle using shell script

I have a shell script that connects to database and calls a stored procedure..when I run the script I am getting the following error ..aggregation_shell_script.sh: sqlplus: not foundPlease let me know what's wrong.I don't find oraenv in either /var/opt/oracle or $ORACLE_HOME/bin#!/bin/kshecho " ...

Re-write file using shell script

Really need your help on writing the shell script based on the condition below.I need to re generate file and display message on the status of the file.I need re-write the file by checking whether the first line starts with '1MBB'.If the first condition fail thenI need to throw an error message (thi ...

how to download rpms from website using shell script ?

I'm trying this out with a shell script - to download rpms from below link,i used this,Quote: ...

Ubuntu Automate using shell script

After writing a C code for a task, I want to automatically compile and execute the latest modified code. I have reached till listing the last modified file, but I don't know how to separate out the file name from the extension.Suppose my latest code is fourier2d.c, I compile and run it with:gcc -o f ...

Ubuntu URL request using shell script and cron

I need to run a URL request every 5 minutes.I think I would use curl in a shell script.The shell script would be run by cron.I am new, but learning quick.Any examples of this would be helpful.TIA...bartee... ...

Ubuntu Switching proxy using shell script

Hi, can you please advise me how to do this?Hi,Is it possible to manipulate the selection of network proxy through shell script?http://i53.tinypic.com/9tigy9.pngto http://i56.tinypic.com/j14y38.pngHow to change the selection of "Default" to "Something" through shell script? What ...

Oracle Automatic Database Backup using Shell script

Can anybody share a sample shell script to take automatict backup of database.So, that It help preparing the same in our enviroment. ...

Sending an email using shell script in Oracle Applications

I have a pl/sql package which will call a shell script program.The shell script program is written in order to send the invoice hold details of AP as a mail.The parameters to this program are passed in the pl/sql package.The shell script program has 5 parameters namely to - email from - emailhold id ...

Oracle Shutdown remote database using shell script

I have requirement of shutting down a remote database via a shell script. I will not know SYS password and hence can't connect directly.I will need to SSH to remote database set ORACLE_SID and then shutdown the database.Please note i want to achieve this without calling any another SQL or shell scri ...

Oracle How to Compile the PL/SQL Package/ Procedure using shell script

I tried to Compiled the shell script but I am facing some error.Can any one help me how to compile the PL/SQL shell script without error. Awaiting for your valuable reply. ...

SSH using shell script terminates the script execution

I am writing a shell script in which i do ssh to remote server and count the number of files there and then exit. After the exit the shell script terminates which i believe is expected behavior. Can some one suggest me a way where even after the exit the script execution resumes.Thanks for the help. ...

need to do a cd command using shell script

Guyz,This cud be simpler but i aint gettin the correct lane. I need to change the current directory( directory from which am running the shell program) to a different directory using a shell program. i tried this system() command it aint workin. ie. if iam workin in /home/karthik and i execute a scr ...

How do I kill process which is consuming more than 80% using shell script?

We have been noticing some runaway Oracle forms processes on the form server for quite sometime. These processes normally consume very high CPU (80-90%). We then manually go and kill using kill comamnd.I would like to write a script which gives me the list of forms processes with CPU utilization in ...

Ubuntu TVTime sox instance closing using shell script.

I'm using 'TVTime' for watching TV in Ubuntu 8.04 LTS, I had problem in sound when I used TVTime, problem was sound was not coming. While searching through internet I got a solution using 'sox' . But I need to execute sox with some parameter parallel with TvTime for that I created one sh file. The p ...

add/remove ssh keys using shell script

I'm new to linux.I need to add one ssh key & remove another key in 20 RHEL remote servers.key to delete:ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqgYqpC+019HDOc5MJ1MqTm 01iubY0nQqbbbjODRWgUlyH+uLUM+NLHpPaWKlVPNpGLmg0uK+ bOXXUprLGxAAHQKgF141lgBPCjW3VfFwTDtK3d1yEOcbMULCBB Bvui2NViUJCkExK7CRO== user1key ...

Attempt to automate subversion backup using shell script

I am attempting to automate an SVNBackup using a sell script (this is my first attempt at one!) but I am having errors when trying to run the attached text file as a script.I get the error that the spawn and send commands are not found. I believe it is something to do with the inclusions at the top, ...

Ubuntu How to add a newline in a text file while using shell script

I had written a script to add time, cpu usage and memory status to a text file as#!/bin/bashgedit temp.txtdate > temp.txtcat /proc/stat >> temp.txtcat /proc/meminfo >> temp.txtThe output looks like Sun Apr 18 17:56:44 IST 2010cpu 73484 7424 27314 995026 15060 1680 1984 0 0cpu0 30206 3 ...