1,891 Topics

Member Avatar for
Member Avatar for sonya2525

Hi, I have a script which uploads files successfully to another server via ftp. But after the files are uploaded, I want them to be deleted (removed), but it doesn't seem to work. I would appreciate if someone could help me out with this. How can I modify my script …

Member Avatar for eggi
0
163
Member Avatar for everlast

i'm an absolute beginner in shell scripting so i need adivice: what is the best editor, and where is the best place to find tutorials for them? i'm a somewhat experienced in c++ so i understand the shell code quite quickly but i'm having truble writing it in vi because …

Member Avatar for masijade
0
90
Member Avatar for naveensurisetty

Hi can anybody help me in understanding this sed -e "1,/^%!ab-cdef$$/d;s/\.#@%&\*)/\)/g" > file.txt Naveen

Member Avatar for masijade
0
21
Member Avatar for lucky11_dude9

hi, can i just know how to use fastmail in a shell script to send mail to a group.. i know wat all arguments to use.. its like.. fastmail args file address.. but m not able to send mail.. please help me out..

0
56
Member Avatar for keef12345

Hi my family computer needs a backup script... it needs to do the following tasks for us.. The script will ask the user which directory they wish to backup? the backup will 'ask' the user for the full pathname of the backup to create also i need the script to …

Member Avatar for Duoas
0
85
Member Avatar for sopel39

why doesn't /usr/bin/time command return maximum resident set size (instead it returns always 0) and how to measure it then? Thx

Member Avatar for sopel39
0
74
Member Avatar for achilleus

consider two methods in a script as below, do_a() { spool $file1 select column1 from table1; } do_b() { spool $file2 select column1 from table2 where column2='xxxxx' } The first method returns just one value say 10001,I have to use this result in the second method in place xxxxx. I …

Member Avatar for eggi
0
86
Member Avatar for rusman

Hello, I have a script I've used on pre-Solaris 10 that works just great. Now on a Sol10 box, it is bailing on this line with this error: syntax error at line 27: `|' unexpected Here's the 'offending' line: [code]creation=`echo $backupid | sed 's/^.*_//'`[/code] I'm a bit confused as to …

Member Avatar for masijade
0
110
Member Avatar for sanjuv

Given a grid of integers size n x m, (use n=100 and m=4 to test it), write a C program that can create 4 (m) children where each will compute the sum of row m (size n). Then, the waiting parent, once all children has computed their respective sums, it …

0
47
Member Avatar for sopel39

Hi My problem is that i need to measure given command statistics (time, mem, etc) with shell script My script must basically do two things: 1. Measure overall command statistics (it is total time, maximum memory use during runtime, etc) 2. Measure command statistics in given periods of time during …

0
49
Member Avatar for jch

Please pardon the simplicity of this question, I kind of got thrown into these responsibilities at the last minute without training. I I need to move a file called status10.dat to a different directory using korn scripting. [code = korn] cp status10.dat* /cerner/d_p19/ccluserdir [/code] I only want to do this …

Member Avatar for ghostdog74
0
94
Member Avatar for thebladerunner

Hi, Is it possible to call the constructur of a java class from a shell script? I know you can call static methods, but can you also call the constructor? Wim.

Member Avatar for masijade
0
44
Member Avatar for chunchuwar

Dear all, I have written a small script which will send me mail on status of server. I have tested it working fine. I am facing only with message subject The last part of my script is as below, cat dailystatus.txt| mail -s "Daily Server Status Report-$yr-$mm-$dd" [email]root@ecms.co.in[/email] The script …

Member Avatar for chunchuwar
0
99
Member Avatar for dave_nithis

Hi all, a=2007-05-10 b=2007-06-10 These are the two given dates and I need to compare. The script should first compare years.If both are same or if a is lesser than b,it should print correct.If a is greater than b,then it should print error.Similarly for the dates(05 and 06). No need …

Member Avatar for ghostdog74
0
1K
Member Avatar for DemonSpeeding

This is my first time writing a bash script in Linux, basically I want to create a user but not use adduser or useradd. So, in the /etc/passwd folder I need to put data in, in this way. login:encrypted passwd:UID:GID:gecos:home directory:login shell I'm going to leave the gecos blank. Then …

0
120
Member Avatar for nroper

Hi, I want to create a script that can be run daily(as cron job?) and which does the following: 1) Queries a MySQL database to return details of registered users. 2) For each user, compares their expiry date with today's date and if the remaining period is either 30,14,7,3,2 or …

Member Avatar for ithelp
0
68
Member Avatar for rickshaw

I'm unsure if this is exclusively a unix/linux scripting forum but I need help writing a windows script (I'm more of a perl/unix scripter). I need to be able to periodically clean out the user profiles on a presentation PC in a conference room. Therefore I need a script which …

Member Avatar for Duoas
0
99
Member Avatar for #ToNeT#

Hi everybody: I have a problem :?:, I would like to paste different files which has this pattern name: namefile_number.dat like this: namefile_1.dat namefile_2.dat .... And I have tried to use paste command, for create a name_final.dat. But such I have done: [CODE] paste namefile_*.dat > name_final.dat [/CODE] It works …

Member Avatar for n2201
0
74
Member Avatar for tamilmercy

I tried to Sends email but somehow email not getting out, please help me how I can write shell script in right manner. Thanks and regards This is the one I tried my end. Script: #!/bin/sh set wma = `grep -i "java" sampletest` echo $wma mail -v -s "ALERT" [email]tamilmercy@yahoo.com[/email] …

Member Avatar for tamilmercy
0
117
Member Avatar for tonyaim83

My C++ program creates a nxn matrix with given value. For e.g if the input is 10 it will creates a matrix of 10x10 now what i want is the script should run program and give input values in a variation of 1000. Say first matrix of 1000 then 2000 …

Member Avatar for maddog39
0
72
Member Avatar for mully

hope someone can help... I am trying to run a script via cron. the script runs fine interactively when logged in as oracle user. The script should run a hot back up of the database(oracle, RHEL3) of course the oracle sid and home path are set when running it manually. …

0
59
Member Avatar for acwbrat

I am new to Daniweb and I need some help with my programming code in Unix. I have written an if-else statement for Bash Scripting and it doesn't work. I have been told that variables would help with my code but I still don't see my program working. I'm suppose …

Member Avatar for masijade
0
82
Member Avatar for acwbrat

How do I change my file extension from me.cpp to me.out or me.cpp to me.exe using Bash scripting. Thanks!

Member Avatar for masijade
0
113
Member Avatar for sgriffiths

Help! I need to total up values which are monetary ie VAR1=123.20 ( £123.20p) VAR2=2000 ( £2000 ) can i do this using expr, i can total them up, but lose the .20p Any help would be much appreciated

Member Avatar for masijade
0
62
Member Avatar for dewey_witt

OK Hi peeps new to daniweb. I have a script missing for one of my classes because I missed due to work :( It's a very simple4 script (I think) It need to eccept the input of ten numbers compair them and output the highest number. This simpler the better …

Member Avatar for radoulov
0
100
Member Avatar for udayaiisc

Dear all, Please let me know the meaning of the script. #zcat compressed_tarball.Z | (cd /export/opt; tar xvfp -) Actually I am I search of command to untar file in to mew directory. Then I got this, but I don't understand it.

Member Avatar for eggi
0
131
Member Avatar for chunchuwar

Dear all, I am facing trouble with calling exit status in a function. Here is part of my experimental shell script to do remote file transfer without prompting for password. I have created error purposefully function iv2 { rsync -a -e "ssh -i $RKEY" $RUSER@$RMACHINE:$BSDIR3/dev/* $MDIR1/dev/ 2>&1 | tee >>$RLOG_DIR/$LOGFILE …

Member Avatar for radoulov
0
84
Member Avatar for sgriffiths

Hello I have a string "c0024" How can i get rid of non numeric digits, so i am left with 0024 removed "c" I cannot think of a way of doing this

Member Avatar for radoulov
0
86
Member Avatar for skelly16

Hi All I have created a script which will email output if the file contains data, this works. But when the file contains 0 data, it tries to email but hangs, when i hit ctrl D, it ask for Cc: address, i then cancel this then it emails me out. …

Member Avatar for masijade
0
86
Member Avatar for arvindishukla

Hi All, A simple questions, can someone let me know the syntax of for loop e.g if i want to print my name 100 times ? Thanks in advance.

Member Avatar for masijade
-1
106

The End.