1,891 Topics

Member Avatar for
Member Avatar for k2k

I had a similar script in solaris and it had no problem. I wrote this one in freeBSD and it gave me strange output. Can anyone please tell me why? thanks a lot [code] #!/bin/sh #This is a shell script that checks file system capacity mounted on /home directory #If …

Member Avatar for eggi
0
102
Member Avatar for grambo

I'm trying to load some data I download from my real estate system. They have split out the features in a separate file. Here are my 2 files: File1.txt (~25,000 records) |123|Main|St|City|State|1701,1708|800,801|MORE|MORE|ETC| |987|Bailey|Dr|City|State|1702,1708,1717|800,801|MORE|MORE|ETC| File2.txt (~1,300 records) |RES|800|City Sewer| |RES|801|City Water| |RES|1701|1 Car| |RES|1702|2 Car| |CND|1702|2 Car| |RES|1708|Door Opener| |RES|1717|Side Load| …

Member Avatar for eggi
0
89
Member Avatar for mashimaro

Hey, I wanted to write a script that would act as a shell, meaning: would display prompt, read from keyboard and run system commands. My guess would be to use fork() and exec() and strtok(), so I wrote this: [CODE] #all includes <bla.h> main(int argc, char *argv){ int proces; char …

0
50
Member Avatar for ckcy2005

Hi All, I am facing a problem. I need to do a script which to generate the temp.txt file first when select from database, until the data finish store into temp file then -> MV temp.txt to finish.txt. Any idea? or any sample script for me to refer? I am …

Member Avatar for JeoSaurus
0
140
Member Avatar for packet

Hello All, I am facing one basic problem please help me out here is my script while [ 1 ] sleep 2 data=16:37 one=15:00 two=17:00 I need to check that is data lies between one and two ( data has to satisfy both one and two ) done how? please …

Member Avatar for JeoSaurus
0
160
Member Avatar for rockX

I have about 5000 columns of data that i need to convert all of it into pecentages. for shorter colums i have been using this code: {print $1/($1+$2)*100,$2/($1+$2),$3/($3+$4)*100 .....} but this is a teadious process... with help i got this sed "s/[0-9]*.[0-9]*/&~/g" | tr "\n" " " | tr "~" …

Member Avatar for eggi
0
175
Member Avatar for flying

Looking to figure out how to do set an at job up from within a shell script w/o using the -f option. The at -f option provides no method (that I can determine) for passing additional command line parameters to the file. I have explored trying to use stdin redirection …

Member Avatar for omrsafetyo
0
241
Member Avatar for prabowoadis

Hai there, I would like to ask about currency format in Bash script let say i have $US2550000, after format it, it become $US2.550.000,00 Thanks for the help

Member Avatar for omrsafetyo
0
952
Member Avatar for macuhail

I am attempting to write a shell script that executes a query on a mysql database. It seems to run fine in the mysql panel, but not in the script. The code is: mysql -u username -ppassword -e 'delete from table where forumid = 25 and replace (title, ' ', …

Member Avatar for macuhail
0
83
Member Avatar for chris5126

Hi guys, i have a ksh script that gets some info on processes and puts it into a temp file: [code] /usr/ucb/ps -auxxx|awk '{print $3," "$4," "$2," "$1," "$11}'|grep -v 0.0|sed 1d > $TMP [/code] It gets the following data [code] 0.8 6.2158230724046144 9918 oracle 0.3 6.2158200964043168 15298 oracle 0.2 …

Member Avatar for JeoSaurus
0
180
Member Avatar for begyu

I have a file containing numbers in the following form: (it has 4 columns and 5 rows and the 3rd row is an empty line) [CODE] (0.761249,0) (0,-0.42632) (0,0.42632) (0.238751,0) (0.636502,0) (0,-0.42632) (0,0.42632) (0.363498,0) [/CODE] and I would like to have like this: (and there would be a number "2" …

Member Avatar for chris5126
0
99
Member Avatar for serkan sendur

i basically want to open a .cpp file modify it and save it. how do i do it using korn shell in unix?

Member Avatar for JeoSaurus
0
96
Member Avatar for chris5126

Hi guys, I need a command on solaris 10 to show how much cpu is bein used in % terms but more specific than sar i need it down to 0.0% if that makes sense. Basically im tryin to find out how much cpu is being used say 25.5% and …

Member Avatar for chris5126
0
91
Member Avatar for Neo7

Hi everybody!! Here is the problem, I'm trying to develop a script that can help me with the raid creation, but, till now, I have been dealing for more than a week and I still didn't achieve any satisfactory results. :icon_cry: Here is the code to execute: # mdadm --manage …

Member Avatar for Neo7
0
188
Member Avatar for chris5126
Member Avatar for ROTC89

ok now im working on another code. i have to add two arrays together to form one array. all that i am getting for the output is 2. here is the code...i know i am missing a few things but i just do not know what exactly. i # some …

Member Avatar for eggi
0
118
Member Avatar for ROTC89

hi im new to this shell scripting. I was assigned to develop some code that increased from 0 to 9 in sort of a pyramid. This is what the output should look like. 0 01 012 0123 01234 012345 0123456 01234567 012345678 0123456789 here is my code please help because …

Member Avatar for eggi
0
253
Member Avatar for chris5126

Can someone tell me why this routine doesnt print out read/write statistics for the first device but does for the other two. I cant seem to work it out. Oh its a ksh script runnin on a solaris 10 box. [code] find_disks() { NETWORKDRIVE=/tmp HOST=`/usr/bin/hostname` integer k=1 integer i=`iostat -en …

Member Avatar for chris5126
0
116
Member Avatar for JustinJose12002

Hi All, How to read the following command line values for a in my shell script? ./test.sh -a file1 file2 file3 i know we can use getopt() but i am geting only first value(file1).. Any help appreciated -jujose

Member Avatar for chris5126
0
121
Member Avatar for pinkfloyd

Hi all, I am using an if condition to compare the word count of a file to be equal to 21.If the file is equal(having 21 words),it is working correct.The problem is that if the file is having different word count than 21 also it is going inside the if …

Member Avatar for pinkfloyd
0
75
Member Avatar for pinkfloyd

Hi gurus, I have a script like this. echo "$file1 does not exists " | mail -s "No File found for $file1" [email]floyd@gmail.com[/email] It is sending the mail.But subject part is not coming.Only the content is coming($file1 does not exists ).Can anyone help me out? Floyd

Member Avatar for eggi
0
97
Member Avatar for yabai1974

I got a simple script if/else script working to check if a process is running and then email if it is not running anymore. My scenario is that I need to make sure the process is always running. Instead of running the script via cron I think it is better …

Member Avatar for Salem
0
222
Member Avatar for Trekker182

What's the best command and line options to use if I'm working with a text file that has spaces pretty much inside each description, field? They are not all uniform in each column and I need to extract them. I've already got rid of the tabs with the tr command …

Member Avatar for eggi
0
99
Member Avatar for babusek

[COLOR="Green"][/COLOR][B][/B][B]HI Folks[/B] This is Question seems like scrap but look into this .. I have several files in a directory(Ex:c:\dir\) now i have to remove the First 3 Characters from the File names in that directory. Using any unix command .. Test Case 1: C:\dir\ 123file.txt 456newfile.mp3 57575unixfile.dat trarruniing.txt After …

Member Avatar for eggi
0
163
Member Avatar for uravikishore

Hi I have server which is hosted in some other location, every day we have incremental backup and every week we have full backup done in the server itself, I need to copy (automate) all backup to my local server.. So I configured ftp server in my local server, now …

Member Avatar for uravikishore
0
118
Member Avatar for gamegod007

The task is i have a folder which has some text files i need to write a shell script which takes this folder as input and in the out put it should give me the filenames,lastmodified date,and the lastline in each particular file help me asap

Member Avatar for noobguy
0
123
Member Avatar for ajay23

Hi all, I am new to shell script. I'm currently running a java application using shell script. When i'm running the java applicaton i need to print all the System.out.println() statements in a file. I don't know how to implement it.. Can any one help me on this. Thanks in …

Member Avatar for eggi
0
67
Member Avatar for neclark2

Hi, So apparently every copy of windows comes pre-installed with a command-line ftp client that can be started by running 'ftp'. However, on the computer I actually need to use this command on, I seem to be missing the client because when I try to do this I receive an …

Member Avatar for eggi
0
81
Member Avatar for Robert72

I'd like to write a shell script that'd parse data from a pipe and then ask the user questions. ie: [code]echo "Ann Bob Charlie" | checkuser.sh checkuser.sh starting Ann is OK. Bob is not in the system. Add Bob? (y/n): [/code] I know a couple ways to read from a …

Member Avatar for JeoSaurus
0
152
Member Avatar for allorehedadem

Good evening , I found a good source of [url=http://www.prcrossing.com]pr jobs and public relations jobs[/url] called [url=http://www.prcrossing.com]PRCrossing[/url]. What is interesting is that is that [url=http://www.prcrossing.com]PRCrossing[/url] consolidates all of the [url=http://www.prcrossing.com]public relations jobs and pr jobs[/url] from other job boards and employer websites and puts them all its site . I …

0
37

The End.