1,978 Topics

Member Avatar for
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
100
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
108
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
82
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
116
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
120
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
68
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
111
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
Member Avatar for javier_ccs

hello, i made a routine in expect that connects via ssh to a juniper firewall, makes a backup of the configuration and saves it into a text file, so far it's working fine, and since it was working so fine i decided to add it to cron in order to …

Member Avatar for javier_ccs
0
130
Member Avatar for skulkarni

Hi, I'm trying to write a shell script that accepts wildcards as arguments. But instead of the wildcards expanding into the list of files from the current directory, I'd like to have them expand into files from another directory. For example, I have a script called test.sh in the folder …

Member Avatar for jim mcnamara
0
175
Member Avatar for GunBao

Hi all, i'm a novice in Shell Programming.. Recently im working on a sch project to create a system which allows user to login, logout, change password, save password.. Some of the requirements are: 1. Check correct userid before asking for password. 2. In unlocking, ask for password only. Userid …

0
57
Member Avatar for darklord

What I am trying to do is to scan a text file word by word and find all words of 4 character or less then output these words to a file, but the problem is I don't know a unix command that can scan the file this way. The Grep …

Member Avatar for jim mcnamara
0
157
Member Avatar for fili00

hey everybody, I just wanted to know how I can print out with awk or others only one line and not a whole column what is made by print$1. I have a data which contains 205 lines and I want for example only the 6th line. I tried with this …

Member Avatar for fili00
0
196
Member Avatar for Manojsah

Hi All, I am implementing simple SHELL similar to bash having functionality that support some BUILT-IN commands like cd, kill, bg, fg, job, wait. It should also support piping and job control. please Guide me how to start this. Thanks manoj

Member Avatar for Manojsah
0
129
Member Avatar for systest

I am trying to find out how to stream a file so that if gives me back how many times a certain field label occurred. File example: Cat black 100 home lost Dog brown 632 street lost Dog black 839 home owned Pig pink 123 mud farm Dog white 345 …

Member Avatar for perniciosus
0
93
Member Avatar for Wolfy

I have these two projects due tomorrow for extra credit in my Unix class and I have no idea how to write them. I really need the extra credit to bump my grade up a little. Any help would be greatly appreciated. Here are the descriptions: Project One: A) Create …

Member Avatar for jim mcnamara
0
104
Member Avatar for gal

I am attempting to write a script that would read entries from a file (one at a time) and for each entry it should cut the given word from caricature 8 till the 3rd from last character. I wrote the following more $TEMP2 | grep join | awk '{print $3}' …

Member Avatar for jim mcnamara
0
71
Member Avatar for raj_thota

Hi, I am Rajesh. I am totally new to shell scripting. I have to prepare a shell script which comapres two directory tree structures ( directory contents comparision is not necessary). for example, suppose I had installed a software system long back and now I want to upgrade that software …

Member Avatar for jim mcnamara
0
420
Member Avatar for alex05

Write a script named killdup. The script sorts all the lines in a file supplied to it as the first argument, and removes duplicate lines. The script stores the resulting output in a file whose name is given by the second argument. I know how to sort it, but how …

Member Avatar for jim mcnamara
0
334
Member Avatar for DanH

Okay, I finally got my external program to open but how do I actually get it to run??? What I am trying to do is open a syncsort file called mjwsorter.srt (I can finally get it to open). Next, however, I want the program to execute... which is done by …

Member Avatar for DanH
0
233
Member Avatar for gundi

Hi! I would like to restore my system to yesterdays, since the changes that I have made has made a bad impact on the htdocs folder, so I rpefere to make a system restore, can you help me plaese..

Member Avatar for chrisbliss18
-1
156
Member Avatar for gg234

Hi, I want to configure my logrotate configuration file as follows we need keep all clients monthly logs to /var/log/apache2/logs folder Under this folder we have different clients directories.Each directory should contain the logfiles that is access.log and error.log files for each folder.Every month end logrotate should run and it …

0
68
Member Avatar for mmiikkee12
Member Avatar for mawe
0
547
Member Avatar for aashiqbhatti

Dear All, I am using CGI and bash Shell scripting programming. I want to upload a file bye Web based application in CGI and pure Shell Scripting. Not in Perl. Please help how to Upload a file using bash Shell Scripting and CGI. Thanks advance. Aashiqbhatti

Member Avatar for manojkumarnayak
0
553
Member Avatar for go4mohit

i have a bash script which takes a string as command line argument and synthesises it using festival.I need to invoke this script every time a user presses a keyboard key(or a particular combination of keys) with the selected text.. can someone tell me how this can be done..

0
53
Member Avatar for antrieb

I need to create a shell script that controls the users runlevel at every startup/logon of the linux system. the user should be prompted with a menu screen taht asks for their desired runlevel. The user should be presented with the following 3 choices: ¤ Single User Mode ¤ Full/Extended …

Member Avatar for shanenin
0
101

The End.