1,891 Topics
![]() | |
hope someone can help... I am trying to run a script via cron. the script runs fine interactively when logged in as oracle user. The script should run a hot back up of the database(oracle, RHEL3) of course the oracle sid and home path are set when running it manually. … | |
I am new to Daniweb and I need some help with my programming code in Unix. I have written an if-else statement for Bash Scripting and it doesn't work. I have been told that variables would help with my code but I still don't see my program working. I'm suppose … | |
How do I change my file extension from me.cpp to me.out or me.cpp to me.exe using Bash scripting. Thanks! | |
Help! I need to total up values which are monetary ie VAR1=123.20 ( £123.20p) VAR2=2000 ( £2000 ) can i do this using expr, i can total them up, but lose the .20p Any help would be much appreciated | |
OK Hi peeps new to daniweb. I have a script missing for one of my classes because I missed due to work :( It's a very simple4 script (I think) It need to eccept the input of ten numbers compair them and output the highest number. This simpler the better … | |
Dear all, Please let me know the meaning of the script. #zcat compressed_tarball.Z | (cd /export/opt; tar xvfp -) Actually I am I search of command to untar file in to mew directory. Then I got this, but I don't understand it. | |
Dear all, I am facing trouble with calling exit status in a function. Here is part of my experimental shell script to do remote file transfer without prompting for password. I have created error purposefully function iv2 { rsync -a -e "ssh -i $RKEY" $RUSER@$RMACHINE:$BSDIR3/dev/* $MDIR1/dev/ 2>&1 | tee >>$RLOG_DIR/$LOGFILE … | |
Hello I have a string "c0024" How can i get rid of non numeric digits, so i am left with 0024 removed "c" I cannot think of a way of doing this | |
Hi All I have created a script which will email output if the file contains data, this works. But when the file contains 0 data, it tries to email but hangs, when i hit ctrl D, it ask for Cc: address, i then cancel this then it emails me out. … | |
Hi All, A simple questions, can someone let me know the syntax of for loop e.g if i want to print my name 100 times ? Thanks in advance. | |
Hi All, Can any one guide me on how to read a mail using shell scripting. Thanks | |
Hi All, Small can some please let me know hpw to use logical OR in csh scripts, below is the code line which is not running and i don't know why it is entring in "if" statement, even though i'm inputing value "1", set ans = $< echo $ans if … | |
I have a text file that I want sed to add a few lines to right before an existing line. What I want to add is: currentpagedevice /InputAttributes get 0 get dup null eq { pop } { dup length 1 add dict copy dup /InputAttributes 1 dict dup /Priority … | |
Hello I am about 3 days new to Expect, I have written a script in expect to automate fire wall back ups. But I want to beable to pull from a list of IPs of the firwalls to telnet to. then pull the configs to a file and then save … | |
Hi , I have a work project on at the moment and am struggling to find the answer!! I have 2 files. 1 file contains a huge list of stuff in the following format 123456789 HOSTNAME 0 415 VLR_HPLMN I then have a file which has an entry in it … | |
I am completely new to Linux and I am trying to learn how to do some scripting. I was wondering if someone could give me an example of a script that would just go out to all certain groups that I have created and delete any files that are a … | |
hello, I try to make a script to move files that are not in use or open by another program or process. it is kind of cleanup script. I need to cleanup some log-files that are not in use by the programs. i know that they are tools to check … | |
[B]input xml file[/B] <ARS> <tag1>one</tag1> <tag2>two</tag2> <tag3>three<AltError Code=123 Description=456789/></tag3> <tag4>four</tag4> <ARS> <ARS> <tag1>ABCD</tag1> <tag2>ABCD</tag2> <tag3>ddsdsds<AltError Code=123 Description=456789/></tag3> <tag4>EFGH<AltError Code=abc Description=defg/></tag4> <ARS> Expected Output: tag1|tag2|tag3|tag4|code|Description one|two|three|four|123|456789 ABCD|ABCD|ddsdsds|123|456789 ABCD|ABCD|ddsdsds|abc|defg The script should read this file and create a pipe delimited file. Each ARS tag record in the XML file should create one … | |
HI guys I need a shell script,from which i can read 1st line of every file present in the current directory. thanks in advance | |
Hi Can anyone advise me on a good Korn Shell scripting book for me. Im fairly new to programming, so looking for a good korn shell book. Im considering buying two books as my work will pay for it. Any suggestions? | |
I need to write a shell script to check a file timestamp and if it has not been modified within 30 minutes, kill a process and restart process. Can anyone help | |
Hi all, I have two files, both have a list of 6 digit values. I want to compare them and output the values that match up. The lines in each file are not supposed to contain the same value (in other words, line 1 in each file may or may … | |
Hi Folks! This [B]should[/B] be trivial, but because of this guy Murphy, it's turned out to be anything but. OK, here goes: Requirement: On a mail gateway running postfix, 1. dump any mail from MAILER-DAEMON via the "postsuper" command. 2. Record how many messages get dumped into a flat file … | |
Hi Script Masters Im new to scripting and having trouble to get this script to work. Basically i want my script to look for files within this directory /apps/gnp/prd/asia/geacssm/ssr/GNPP02/var/ft/backup/ I have put all the files i want to look for in the above directory in a txt file, example of … | |
Hi guys, i need help with a script. [CODE]#!/bin/bash # This process id pid=$$ # Path to the file which contains the process id path="/var/tmp/" # File which contains the process id file="accumRunning" pname="accumData" # Command for checking and running cmd="php /home/kersten/workspace/AdBenchImporter/import.php" # check if file exists if [ -s … | |
Hi All, Can someone help me writting a function in csh / tsch shell, i'm getting below error, l () { ls -lrt ; } [COLOR="Red"][B]Badly placed ()'s.[/B][/COLOR] Thanks, Arvind S. | |
Hi All, Below is little bit of code, which i'm unable to run, #!/bin/csh echo answer = "" echo " Please enter x to exit from script and anyother character to continue" read answer if ( "$answer" = "x" ) then echo "Exiting from the $0 script, please the error … | |
Hi all, I have a file (tnsnames.ora in Oracle) from which i have to extract the values of two fields. Suppose following is the content of my file called "inputfile.txt" (ADDRESS = ( PROTOCOL = TCP ) ( HOST = 1.1 ) ( PORT = 1521 )) (ADDRESS=(PROTOCOL=TCP)(HOST=2.1)(PORT=1521)) (ADDRESS = … | |
Dear all, I'm doing a script to create a DB user on all machines. I have no way of using sudo. This is for a cross section of sun machines. i need to ssh to the server, then do a su to root, create the account and then exit. i … | |
I hve code like echo $1 echo $2 and am executing the code as ./script.sh /home/*.txt /home/*.xsd [B]The corresponding .txt files and .xsd files of the directory are getting substitued as the command line argument .[/B] and it prints smething like data.txt value.xsd [B] Apart frm using * [/B]if i … | |
file_list='find /home/attrib/ -name *.csv' for fn in $file_list do echo "Inside the loop" echo $fn done I need the list files available in the specified directory find /home/attrib/ -name *.csv - This works on the command line and gives the desired output . But the above script Gives me output … | |
Ok so I made the following script: [code=bash] #!/bin/sh if ! ps -C screen > /dev/null then exec xterm -fg green -bg black -e screen else if ps -C xterm > /dev/null then exec xterm -fg green -bg black -e screen else exec xterm -fg green -bg black -e screen … | |
I have found a script which does password changes on multiple machines without installing additional packages which is what I need. Problem is it uses telnet and ftp. I need to modify this to use ssh and scp. Any help greatly appreciated. Thanks #! /usr/bin/ksh # changepass --- change the … | |
for i in table1 table2 table3 table4 do perl -ne 's/ *\|/\|/g; print' ${AHS_DATA}/${i} > ./${i}.dat done what does `perl -ne 's/ *\|/\|/g; print' ${AHS_DATA}/${i} > ./${i}.dat` mean? | |
Hey, I need to know the command for adding secondary groups for a user. The only catch is that I have to assume that they are already members of some secondary groups. And if I use modprpw -G [group], then it erases any secondary groups they were previously in, and … | |
So I am hoping this is a very simple fix. I am still learning how to write some scripts but I have a file with a list of names such as: sname.txt Joey Kaylin Dad Mom Melissa Toby I am trying to have the script check the value of it's … | |
Hi All, This is my 1st post in this forum, and new to shell scripting too, so to start with I would like to share something I have created today My Question: I would like to get the output of this script in a html page. =========================================== #!/bin/bash echo -n … | |
Hey, I'm running an HP-UX box, trying to create a little script that will compare the /etc/passwd file with another file I have created. Each line in this file, let's call it /etc/myusers, has a pin that the user has chosen (not necessarily unique), then their userid, then the comments … | |
Hello. I've given a task to 'print all the files in a directory in the format---<File name> <Size in Byte> <No of Disk blocks used> ,sorted by 'disk blocks used'(reverse order)..............if same no of disk blocks are used by two files then largest file will be printed first' I used … | |
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 … | |
Guys, I'm quite new with awk and wanna do something like this: let say i have a file with this content : aaaa,bbbb,cccc,dddd and i wanna do an insert of " " only on the third column. and the output to be like this : aaaa,bbbb,"cccc",dddd fyi, the file contains … | |
Hi all, can any one help me to solve the below query #!/bin/ksh #create or replace procedure a1 (a in number, b out varchar2) #is #begin --for testing purpose # b :='OKAY'; #end; $ORACLE_HOME/bin/sqlplus -s $userid << EOF set timing on set arraysize 5000 set serveroutput on size 1000000 exec … | |
hai, Print all the lines from the /etc/group file that don't contain the string "daemon". | |
Hi All, I am trying to use awk to strip out the java version after I run the java -version command. Unfortunately nothing I try works. Here is the command I am running along with the output: # /h/jre/bin/java -version java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build … | |
I'm new to bash, only been doing it a day or so, but having some trouble with one thing. I am trying to create a script that checks for updates, places them into a file, slightly formats them, then emails them. It's the latter I'm having trouble with, I have … | |
I originally posted this in the wrong forum, so I hope I don't get ripped apart for a double post. As part of my new job, I'm learning a little shell scripting, working on an HP-UX system. I'm trying to automate a user account creation process, and I need to … | |
I am making a script in Which FTP has to run automatically rather than providing user and password manualy...i just want to know the status that the file i am sending after FTP starts is reached successfully of not to destination by making a logfile ...which shows it is successful … | |
i have whrite this to learn a bit shell scripting, but now theres a mistake in it and i cant figure it out... (sry my english is very bad xD) here is my script: #!/bin/sh echo "This Programm will help u create, delete and coppy Directories and Files." echo "What … | |
Hi , when i specify export ORACLE_HOME=/orahome/app/oracle/product/10g export PATH=$ORACLE_HOME/bin bk=`hostname` echo $bk it gives error hostname not found if I comment both export line it works fine Can anyone tell me why is it so ?????? Thanks Vrgurav | |
Hi All, I am new to scripting. I need your help to removing spaces from a string and assign them to different variables. Iwant to call script with one command line argument which is file name which containes different attributes their type and different values eg fdxE1ConfigAdminStatus int 1 2 … |
The End.