1,817 Topics
| |
Hi, I am new to bash scripting. I have some questions here, Can anybody help? I have a text file which has the following format. UserNam User full name road and house nr. post nr, city phone, mobil Department, job The first thing should be to open file and find … | |
Hi, I'm trying to use a code that change the wallpaper automatically, but I obtain the next error: Line 18: Unexpected EOF while looking for matching `` ' Line 25: sintax error: Unexpected End of File I think the code line is: cnt=`wc -l "$temp_bg_list" | cut -f1 -d " … | |
I need to write a shell script which does the following: script shld be in such a way that I just need to pass a parameter and it shld generate the report by running a sql script and store it in a directory and email this report in every 30mins … | |
I have to write a script called trying. The script takes a full path (like /users4/st/jdoe/prog.c) as an argument and displays the path and the file name. For /users4/st/jdoe/prog.c, the path is /users4/st/jdoe and the file name is prog.c. I know that I can use grep for it, but it's … | |
Hiiii, here is my script-- [Code]: BackupLocation="$OPTARG" if [[ $LFlag -eq 1 ]]; then echo "Either option l or L should be given to $Programname" echo "$Usage" echo "$Programname is terminated" return $ERR; fi if [[ $isBackUp -eq 1 ]]; then if [[ ! -d $BackupLocation ]]; then echo "Non-existant … | |
Hiii, i have a doubt here-- [CODE] DirCleanupList="logs tmp corefiles" echo "$DirCleanupList" | perl -ne 'print join("\n", split(" ")) . "\n"; ' for dir in $DirCleanupList do BackupLocation="$BackupLocation/$dir" mkdir -p $BackupLocation >/dev/null 2>&1 if [[ ! -d $BackupLocation ]]; then echo "Unable to make backup directory: $BackupLocation" continue fi done … | |
could you please find a solution for this script (called phone) that creates a simple telephone list (create an empty file called “phonlist” in home directory) . Each line in this file consist of two fields name and the phone number, the script should do the following: When user types … | |
Hey all, first post here and as im sure once i ask my question.. you will all know that i am very new the shell scripting. I spend all of time in php, not shell. I need to figure out a way to see if a shell varable has a … | |
Ok, I have noticed that everything I like to do in windows using c++ can easily be done with .vbs scripts. Just to clarify the books I looked into buying to teach me .vbs all mostly talk about vbscripting for html??????????????? Is that what .vbs scripting is usually for .. … | |
Here is mywhole script. [CODE]WhenToRun="01:00" FilesToDelete="*log* *.log*" FileLocation="$INTAS_INSTALL_DIR/envs/logs" if [[ ! -d $FileLocation ]];then echo "The FileLocation specified in Non-Existant" fi Progname=$(basename $0) Usage="Usage:$Progname"'[-a <delete or backup>] [-l|-L <backup location>] [ -t <time>]' IsCronJob=0 if [[ "$1" = "cron" ]]; then . ~/.kshrc IsCronJob=1 if [[ -z "$INTAS_INSTALL_DIR" ]]; then … | |
Hi I'm trying to compare two files names using the function given below. The files to be compared are named as xxx_yyy_abc_def_.rtf && xxx_yyy_abc_def_.html The extentions and the underscores are removed from the file names and then stored in two different arrays. So the file names stored in arrays are … | |
Hi I have searched for a way to replace odd characters in a FOLDER NAME. All search-and-replace issues I have seen, only involves how to make search-and-replace on a FILE och with TEXT INSIDE a FILE. My problem is with the FOLDER NAME. My case is this: I have a … | |
I don't know if this is the proper forum for my question, but I'll give it a try. We have a few standalone Java applications sitting on a remote AIX box. These applications are listeners, so they start up and wait for events, i.e. they remain running, kind of like … | |
hello Guys,,,, I got Oneproblem in Running Two Threads Regusivily,,,, anybody of u,,,,,, can clear my dobght in using thread _join()..function in two threads..... | |
Im developing an application console based in c++ , and needed a quick and easy way to script an outlook email. I found the below script to use which works great, but for one problem. PROBLEM: When the script is ran, outlook prompts me to let me know an application … | |
I am trying to create a folder with in a folder by passing a parameter. this is what I am trying to do parameter I am passing in a function today(date) is 20080124 and declared a variable dir=/ab/bc I want to create a directory with this this parameter value with … | |
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 … |
The End.