1,891 Topics

Member Avatar for
Member Avatar for mcrosby

Hello, I am new to shell scripting but I am attempting to create a script that connects to an ftp and downloads a folder of files. It then compares the downloaded folder on the local machine to another local folder. I am not sure how to work the compare function …

Member Avatar for mcrosby
0
159
Member Avatar for hferoz

I am presently working in IBM INDIA, we are currently working in DB2 database i want to know the nook and corner of the database so pls send pdf document for this and do the needfull for u.

0
72
Member Avatar for massoo

hi, can i run a shell script as a daemon ? the shell script looks like this : [INLINECODE] #!/bin/sh BATDIR='/' export JAVA_HOME='/usr/java/jdk1.5.0_06/bin/java' export MESSAGE_SENDER_HOME='/home/mas50o21/MessageReader/' export LIB='/lib/' export COMMONS='/commons/' export JBOSS_HOME='/home/jboss/jboss-4.0.3SP1/' export CLASSPATH=$CLASSPATH:${JBOSS_HOME}client/jboss-common-client.jar: \ ${JBOSS_HOME}client/namespace.jar:${JBOSS_HOME}client/jboss-system-client.jar: \ ${JBOSS_HOME}client/getopt.jar:${JBOSS_HOME}client/log4j.jar: \ ${JBOSS_HOME}client/activation.jar:${JBOSS_HOME}client/jboss-jaxrpc.jar: \ ${JBOSS_HOME}client/mail.jar:${JBOSS_HOME}client/jboss-saaj.jar: \ ${JBOSS_HOME}client/jboss-j2ee.jar:${JBOSS_HOME}client/jboss-transaction-client.jar: \ ${JBOSS_HOME}client/jmx-invoker-adapator-client.jar:${JBOSS_HOME}client/concurrent.jar: \ ${JBOSS_HOME}client/jboss-deployment.jar:${JBOSS_HOME}client/jbossx-client.jar: \ ${JBOSS_HOME}client/jbossmq-client.jar: \ …

Member Avatar for radix
0
249
Member Avatar for seran128

I am monitoring a logfile using tail -f [URL="http://www.linuxforums.org/forum/#"]file[/URL].log|"ERROR" I would like to write a korn script that monitors this for me and emails me if the event happens. It would be great if it attached the file to the email as well. Any Ideas?

Member Avatar for masijade
0
105
Member Avatar for mattlock73

Hey all. Thanks in advance for any help you can give, hopefully this is an easy one. I want to create a loop to run a simple performance monitor like vmstat and record it to a file, but have very limited scripting skills. Starting with this... date >> /var/log/perfmon.log vmstat …

Member Avatar for mattlock73
0
143
Member Avatar for wandererman

I need help to write a simple shell script due for tomorrow. this is the question.. Create a UNIx script to use the following file as input. ------start of file----- Geore Washingon Bill Clinton Abe Lincoln -----End of File----- OUTPUT: lAST NAME ONLY IN SORTED ORDER. It is my first …

Member Avatar for masijade
0
95
Member Avatar for deft

I need to do something I'm told that is relatively easy to do, but I can't find specific instructions on how to do it. I need a way to look at incoming emails and run commands based on key words in them. For example, incoming email: Subject: Thing# 123 Body: …

Member Avatar for TKSS
0
112
Member Avatar for ahan

Hi, I have to manipulate a data file which say reads like this {$index $value $error_on_value} aa 4.56 0.7 bb 123.456 0.00987 cc 987654 321 . . in easily human readable format of type aa 4.6(7) bb 123.456(1) cc 9.877(3)e+05 value rounded to 4.6 with error of 0.7 on the …

Member Avatar for abhinav_shah
0
232
Member Avatar for TERRORISTsam

hi probably a noob qustion but this is my first attempt at shell scripting. im trying to open a file in a new window that the user types the name of during the run time of the script. i have tryed several different ways of doing this including. read >> …

Member Avatar for masijade
0
95
Member Avatar for gatormike53

May be in wrong forum but I did work out the lookup problem, what I am still having problems with is making sure the lookup can find the address book file regardless of the current working directory. I believe I need to do this with $PATH but am unclear on …

Member Avatar for ranj@chn
0
156
Member Avatar for gatormike53

New to Linux and need the credit for my class to ensure a good grade but not sure on the cmd line to finish I have created a data file called ".addr_book" in home directory plus a 'bin" directory . NOW this is what I am unsure of I need …

Member Avatar for ranj@chn
0
339
Member Avatar for problems

[COLOR=black]i would like to find files that have been modified during a month. lets say i am type in 2004 06 it will find files in the month of june. i know using l -la lista all the files and thier attrbutes. and one of thier attributtes is last modified …

Member Avatar for ranj@chn
0
89
Member Avatar for rockwell

Hi all, i am new to shell scripting and know very few basics, i have a shell script program written by some other guy and i am trying to understand it. I am unable to understand a few parts of the program, hope some one cud help me with this …

Member Avatar for kamitsin
0
213
Member Avatar for elidio

Hello, good afternoon. Im a newby user writing my first shell script, and i trying to make it run with the cron utility. If i run this code manually, the code was sucefull runned, but, when i put in this task in the crontab, the mail dont cant sended. When …

Member Avatar for elidio
0
473
Member Avatar for Sona

I have an input file coming, based on what is there in the starting from the third character (which is the table name starting from 3rd character in the first line).I have to set the parameter x. like If the table name='employee'(sarted from the third character) then x=1 if table …

Member Avatar for Sona
0
103
Member Avatar for garric

Hello, When mail command is used to read mails.... after 1 msg is viewed, a prompt is displayed for [B]user input[/B] ...for eg 'n' - to move to the next msg 'd' - to delete the msg just read ...etc how can i include this feature in a [B]shell script[/B] …

0
69
Member Avatar for problems

i am having a problem with writing a shell script to back up files for a specific month. the month and year are specified as paramters. so a backup of all the files modified during the specified month have to be made. for example if specify 200406 as my parameter, …

0
80
Member Avatar for virgilpal

This problem is making me alot of problem : A C program is given. Determine, for each global variable, the number of occurences and the number of lines where it is used by refference. I accept any help. Thanks

Member Avatar for virgilpal
0
146
Member Avatar for garric

The MAIL command requires the user to press the 'Enter' key or 'n' to move onto the next message once the present message has been viewed. How do I achieve this in a shell script in order to automate the copying of successive mails onto different files. Can sumone please …

0
99
Member Avatar for iamafreak
Member Avatar for garric

i wanted to write a shell script that can automatically read unread mails and copy each one into a different file. I was trying to use the MAIL command to do it, but this command requires user input inbetween, I was wondering how that could be achieved in a shell …

0
63
Member Avatar for pulluru

This is what i have in a file sortdata IGOT C9.1.20.2DBSU10 - - CVGRETesting C9.1.20.2DBSU11 - - BalInqMail C9.1.20.2DBSU11 - - SecScore C9.1.20.2DBSU8 - - IGOT C9.1.20.2DBSU8 - - IGOT C9.1.20.2DBSU9 - - SecScore C9.1.20.2DBSU9 - - When i Sort i am getting BalInqMail C9.1.20.2[B]DBSU11[/B] - - CVGRETesting C9.1.20.2[B]DBSU11[/B] - …

Member Avatar for kenisand
0
107
Member Avatar for jlbovo

Hello, i stumbled across this forums on google.com. I hope someone can provide helps for my questions. I have a freind who runs a t-shirt business, and i did him the favor of returing a favor and wrote a script for him to roganzie his accounts based on date searching. …

Member Avatar for masijade
0
115
Member Avatar for ljegal

I have a shell script, /path/adir/script1.sh, that calls another script, /path/bdir/script2.sh. Now, I am in the directory /path/cdir/, and I call the first script like this: ../adir/script1.sh The problem is that script2.sh cannot be found. In fact, even if script2.sh is in the same directory as script1.sh, the same problem …

Member Avatar for datrinite
0
166
Member Avatar for jasminemary

Hi I am assigning some values like this in my script. [PHP]server1=admin server2=managed server3=managed1 count=3 while i in $count[/PHP] With in while i like to get the admin, Managed and Managed1 values. What i did is [PHP]val=server$i echo $val (it prints server1 with in loop, but i like to get …

Member Avatar for masijade
0
129
Member Avatar for SurendraNath

By default , Array subscript value taking the range upto 4096. But i need to use for 50,000 . Please provide the help for the same

Member Avatar for SurendraNath
0
107
Member Avatar for anwarsait

Hi all, I need shell script manual for db2. if anyone have the pdf documents, please do send across to me. i will be very much thankful. regards

0
75
Member Avatar for jasminemary

Hi I know the cut option which is used to cut the column from [B]file[/B]. I like to get the filename only when it is being stored in the variable with the extension attached to. file=jasmine.txt I like to fetch jasmine(file name only). I am newbie to shell scripting. Please …

Member Avatar for jasminemary
0
98
Member Avatar for dvr

does anyone know if Dynamic C is the same as visual c+? also I am trying to find or make a simple program of a time clock like this for controlling outside lights. [IMG]timeclock.jpg[/IMG] does anyone know where to find a site for help on this?

0
61
Member Avatar for kriezo

Hi there, I have a problem here that involves bash script since I was noob in that field. Recently, I have to monitor data involve in logs so I just run command tail –f for the monitoring. The logs was generate every hour so I need to quickly change my …

Member Avatar for masijade
0
160
Member Avatar for jasminemary

Hi all, I like to moitor the database server from application server.I like to check tha particular server fo this DataBaseis up and runnig. I could do it in Java( JDBC program). But the difficulty is when i am spreading this program across all servers, i need to modify the …

Member Avatar for jasminemary
0
90
Member Avatar for anwarsait

Hi all, Im executing db2 export command using shell script. I want to check for error status in the script. if db2 command fails due to some sql error, shell script should log error msg and the script should not run further. i would like to know shell script command …

0
58
Member Avatar for craju45

>file this redirects the output into a file. but if the out of the line is more then, the extra length will not be visible in the 'file'. so to see the extra lenth of a line in a new line u give >file 2>&1 ex:- >file this is outp …

Member Avatar for masijade
0
91
Member Avatar for dannyfang

Hi, I have a script which is to perform the following task: 1) check for files in a particular directory. 2) The directory should contain 4 files in the form of: <OSSInstance>_<OSSName>_BSC<Nokia BSC ID>.<counter no>.<YYYYMMDDHHMM>.<gid> whereby: OSSInstance - a combination of alphanumeric characters OSSName -a combination of alphanumeric characters Nokia …

0
91
Member Avatar for neko128

I have the following script snippet, adapted slightly from something I found online a couple of weeks ago: ftp -i -n $HOST >$TODAY/ftp.log <<END_SCRIPT quote USER $USER quote PASS $PASSWD lcd $TODAY mget * quit END_SCRIPT $TODAY is defined as such: TODAY="`date +%m%d%H%M`" It's just to create a unique directory …

Member Avatar for alc6379
0
118
Member Avatar for bhavana

I have a string that looks like this LOCATION="/home/dev/V1.0_MODULENAME_yyyyMMdd_hhss.tar" I would like to parse it such that i get the module name. I tried a k shell script with following commands... MODULE=${LOCATION:20:32} MODULE=${LOCATION#*_} First one doesnt compile saying the specified substitution is not a valid command and the second one …

Member Avatar for jim mcnamara
0
123
Member Avatar for sameet_aset

Im finding trouble writing a script that runs from account A, switches user to B (on same server), performs a few jobs at B, and switches back to A. I want the password for B hardcoded in the script so that it doesnt prompt for one. Someone please help.

Member Avatar for alc6379
0
165
Member Avatar for riverrock

having difficulty with this please help with code if anyone can. ____________________________________ Write a script that plays a ‘double or nothing’ game. The rules are: a bet is laid and the dice is rolled. If it’s an even number you win double the bet. If it's odd you lose the …

Member Avatar for alc6379
0
81
Member Avatar for walawala

Need help on this simple script... I am scratching my head... when I do echo $myhost it returns db3 However, when running the script, the first IF condition is always true... what went wrong? Thanks! Here is the script: myhost=`hostname -s` if [ $myhost='db1' ]; then echo "###############################################" echo "### …

Member Avatar for alc6379
0
164
Member Avatar for zerolimit

I'm basicly trying to write a script that will search through all files in the /home directory and sorting out key words such as kill, bomb, porn ... etc. Then having the output displayed as User "username" has "the keyword" in "filename" I'm pretty new to this and I'm pretty …

Member Avatar for zerolimit
0
115
Member Avatar for abhinav_shah

Hi ! This is the code of a script main.sh [CODE] while read line do chmod +x temp.sh ./temp.sh $line done <test.txt [/CODE] Now this script reads from a file test.txt and calls another script temp.sh. Here is temp.sh [CODE] echo $1 rsh alpha11.xyz.com ls [/CODE] Now the problem is, …

0
119
Member Avatar for Prestwick

Hello all, Essentially a newbie to shell scripting (and Unix/Linux as a whole!) Essentially doing this project for my year in work placement. Essentially it is a script which searches for specific files and backs them up to tape. However I need to modify said script so it can verify …

Member Avatar for Prestwick
0
204
Member Avatar for diddle

Can anyone help me for shell programming basic concept? I want to print the number from 1 to 10 in file1.txt from 2 to 11 in file2.txt from 3 to 12 in file3.txt from 4 to 13 in file4.txt . . . from 21 to 30 in file21.txt How to …

0
79
Member Avatar for diddle

How to store the result of find command in Shell program? I want to store if found then result = 1 else result =0. How to set the result ? My code result = $ (find . -name "doll" ) Can anybody help me? ps. tcsh in cygwin

Member Avatar for diddle
0
151
Member Avatar for debunix

Hi, I have the following task to perform using shell script. The user will provide a [B]directory name[/B] along with a [B]date[/B]. 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 …

0
67
Member Avatar for adil_uk

I'd like to create a "shell script" that ease and simplify the use of "Sort" command. Well my shell script should cover the use of " -b -d -f -n -r "options. also my script should do the following: -allows both relative and absolute pathname arguments -process either filename arguments …

Member Avatar for atanu_amd
0
119
Member Avatar for MikeDirnt

Hi Can anyone help me with this. Im new to doing scripts. Thanks I am writing a simple script to cd to another directory. But the directory does not change after running the script. How can i make the directory change after running the script? operator@tiger013s% pwd /export/home/tiger013s/operator operator@tiger013s% more …

Member Avatar for jim mcnamara
0
181
Member Avatar for mfmalik

Hi, I want to access folder on a remote server in a LAN. I just need to access data from there. The script needed to run and create report on server it is resident only data needs to be accessed from other server. Please anyone can help? I have no …

Member Avatar for mfmalik
0
143
Member Avatar for diddle

I need to rename all the files in the current directory,if it contains specific letters using shell programming. For that I used foreach file if (`grep $2 $file`) then mv "$file" newname; in $2 the specific characters are stored. How should I modify this code? Are there any simple way …

Member Avatar for diddle
0
110
Member Avatar for Subterraneus

A script to edit log files, it can remove the username, UID, a specefic string, remove logs and remove the netinfo backup, it's not working. [CODE]#!/bin/bash remove_logs() { find -f /var/log -f /Library/Logs -f /Users/*/Library/Logs \! -iname "*.gz" \! -name ".DS_Store" | while read file ; do sed -e "s/${USER_ID}//g" …

0
116

The End.