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