1,891 Topics
| |
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 … |
The End.