1,891 Topics
| |
Dear all, Here is output of my command -bash-3.1$ psql -l |cut -d "|" -f1 | grep -i repo repository repository_reports $ I want to drop these database thru script one by one. My requirement is to take the these o/p one by one and use it with dropdb command. … | |
I am having an issue with the variable expansion. I want to read a list from a file. The list can have * or multiple file wildcard like - test* stuff*. Here is the script #!/bin/bash datadirin=/home/william/tmp2 filelist=`cat $listdir/$sname.list` export filelist export datadirin # echo filelist is "$filelist" echo filelist … | |
hi, iam fairly new at unix.what iam trying to do is iam running a perl script through crontab.the problem is iam getting an error message on my mail. this is the crontab file: 24 16 22 1 * perl /rishi/s-branch/perl1/perl/filecomp.pl this is the content of my perl file #!usr/local/bin/perl @comp=`diff … | |
I have to write a shell script like this-- 1) Utility will be run under the directory owner. 2) This utility will clean files in ABC/logs. And following logs will be backed up or deleted. Dispatcher Logs Middle tier Logs Sage log Sage monitor log Sage db clean up result … | |
[B]I need a script that will do the following tasks[/B] Write and test a script called ExpWord.cmd that would do the following: copy all the files in the Exploring Word directory to a new directory on your H drive called ExpWord Use a wild card character to delete all that … | |
hi, i have a series of files like this one: D22 L58 two O12 L58 two Z5 L58 two Z19 L58 two and i want to make the first column into a variable ($var) that will be used in the rest of the shell script This is my awk script … | |
Hiii, I have a requiremnt like this--- 1) Utility will be run under MT owner. 2) This utility will clean files in ABC/envsw/logs. And following logs will be backed up or deleted. Dispatcher Logs Middle tier Logs Sage log Sage monitor log Sage db clean up result log Core files … | |
hi, a hard-working but horribly lost cs major here. i'm working on a script that does global renaming using find, awk, and sed, which has wildcard inputs. i'm wondering if there's any way to strip the asterisk from the input and save it to some variable, say $str1 or just … | |
Hi all, The scenario is like this: i have one file which contains some particular paths, now my aim is to make changes in this file so that i can change the path in that file.. eg: file1.txt: ABC -p /home/user/a/b/v23.9/library -l /home/user/a/b/ABC/v23.9 test.exe DEF -r v23.9 /c/d/f -p /home/user/a/b/v23.9/library … | |
Hi all, My directory structure is as follows [B]home /md/DEV/SCRIPTS/DAILY[/B] and [B]home/md/DEV/MIS/LANDING[/B] so this command [B]find home/md/DEV/MIS/LANDING -name MIS_Customer_\*[/B] is giving me the desired output [B]/home/md/DEV/MIS/LANDING/MIS_Customer_20080114.txt.[/B] since i dont want to hardcode the path ie)home/md/DEV i opt for relative path like [B]find ../../MIS/LANDING -name MIS_Customer_\*.[/B](since all myall my scripts are … | |
First off, the standard disclaimer: I am pretty new at shell scripting, and my work at this point is mainly hacked-together ideas and pieces from other people's. Thank you in advance for your tolerance. :) I am using Ubuntu Linux 7.10 Gutsy, which has the bash shell. I wrote a … | |
Hi ! I'm trying to find the substring in a shell script as given: [code] #! /bin/bash HTML="<html><body>OK</body></html>" OK="OK" OFFSET=`expr index $HTML $OK` OK_LEN=`expr length $OK` var1=`expr "$OFFSET"` echo $var1 var2=`expr "$OK_LEN"` echo $var2 INPUT=`echo | awk '{ print substr("'"$HTML"'",var2,var1) }'` echo $INPUT [/code] But on running it does not … | |
I would like to ask for the looping statements and conditional statements syntax and some samples for me to easily understand... And also, How can I edit numbers to have its decimal points like float and double in other programming language. I'm really noobie with Linux so can someone please … | |
I want a sample Date validation script using if loops. The script should first compare "year".If the year is lesser than the current year,It should go for "month" checking. I have the script that splits the date into year,month and date.I want only the checking part. My if loop checking … | |
Hi i need to have a update for a file that updates only the last modified content from another file.... say for example....if file A is having content like . . . hatxxxx catxxxx ratxxxx and file B(the file to be updated is having content as hatxxxx catxxxx then file … | |
Hi, I have a script, when I run it The output overlaps : Example Instead of saying Canadian 1.00 Dollar it would say something Canadian Dollar00 I also need to know how to find the amount of decimal places in a variable and also how to check if a variable … | |
advance happy new year to all, i am having a script.The purpose of the scripts is as follows.If the current month is march,june,september or december ,increment flag should be set to '1' otherwise increment flag should be set to '2'.the script is as follows month= date +"%m" if [ "$month" … | |
Im having some problems to write a shell script which will give a certain type of file in the current directory. I.e if i want to delete a certain type of extensions like .psd or jpeg, i m having some problem in logic to make a shell script. The script … | |
HI All, I am Gurudev and this is my first post in this forum. I am software test engineer. Now a days I am trying to do automation for out ADSL product line testing. So I need to do some programming. I have installed Procomm Plus and would like to … | |
OK - I'm new to all of this. I need to create multiple files from a list. For example Myfile1.php becomes myfile2.php, myfile3.php, myfile4.php When my list is 2 3 4 I also need to do a global find replace. I have found enough examples of doing that online I … | |
hi friend, I am have too this problem (GETOPENFILENAME), only that I use AutoIt, my ask myself if you can resolve the problem for other side. if your code work correctly this will being very util for my. well. If I can resolve the problem I write the solution in … | |
the code is given as #!/bin/sh i=1; while [ $i -le 5 ] do echo "welcome $i times"; i= 'expr $i + 1 '; done it enters into infinite loop and does not increment the i variable plz suggest something exit 0; | |
i have installed cygwin with vim and vi editor but when i type into those editor nothing gets written and message comes that no string under cursor plz help somebody | |
Hello, I would like to use a simple "if then" test to check if an argument to a command begins with "http://" as follows: if [[ $2 == [url]http://*[/url] ]]; then command fi but the wildcard just seems to be ignored, ie., it will only execute the command if the … | |
Hi all, I am new to shell script and really help. I need to connect to MySQL and do some proccessing. How can i do that? Thanks | |
Hey guys! This is my first post, as im new here :S I have a simple problem for a big program. We have a .sh to install it, but when I run the .sh in terminal like i should, It says the class is not found. I believe it has … | |
I have an email log that needs some parsing. Can anyone help me to use sed or awk to parse this log and return only the domain names, listing them only once and ignoring case? Dec 19 14:59:09 host53a pop3d: LOGIN: DEBUG: ip=[::ffff:192.168.1.1], command=USER Dec 19 14:59:09 host53a pop3d: LOGIN: … | |
HI I would likt to create input files for testing, format is like this INPUT Format DISP NUM BYTES Desc 0 4 CODE 4 10 EMP NO 14 3 AGE 17 1 SEX which will be used for creating flat files ( data in excel file). OUTPUT file should be … | |
HI I would likt to create input files for testing, format is like this INPUT Format DISP NUM BYTES Desc 0 4 CODE 4 10 EMP NO 14 3 AGE 17 1 SEX which will be used for creating flat files ( data in excel file). OUTPUT file should be … |
The End.