1,891 Topics

Member Avatar for
Member Avatar for ammayi67

thanks for allowing me join your forum i have an output of linux command "who" which provides following details..... CURRENT USER/ACCT INFO 17:31:36 up 4:49, 4 users, load average: 0.03, 0.04, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root :0 - 12:59 ?xdm? 4:54 0.02s /bin/sh /usr/bi root …

Member Avatar for JeoSaurus
0
2K
Member Avatar for gian10890

SOBA11009_1_1.xml SOBA11009_1_2.xml SOBA11009_1_3.xml SOBA11009_1_4.xml SOBA11009_1_5.xml SOBA11009_2_1.xml SOBA11009_2_1.xml SOBA11009_2_2.xml SOBA11009_2_3.xml SOBA11009_3_1.xml SOBA11009_3_2.xml SOBA11009_3_3.xml 978-0-387-98595-4 Is it possible that I want to create a batch file that overwrites the SOBA1109 with 978-0-387-98595-4? output: 978-0-387-98595-4_1_1.xml 978-0-387-98595-4_1_2.xml 978-0-387-98595-4_1_3.xml 978-0-387-98595-4_1_4.xml 978-0-387-98595-4_1_5.xml 978-0-387-98595-4_2_1.xml 978-0-387-98595-4_2_1.xml 978-0-387-98595-4_2_2.xml 978-0-387-98595-4_2_3.xml 978-0-387-98595-4_3_1.xml 978-0-387-98595-4_3_2.xml 978-0-387-98595-4_3_3.xml

Member Avatar for JeoSaurus
0
175
Member Avatar for manish250

hello all i m writing a script in which i am trying to set classpath using this export CLASSPATH=$CLASSPATH:/usr/java and then i run the script But nothing is added in the bash_profile

Member Avatar for griswolf
0
800
Member Avatar for abrmhk

Hi I am reading x lines from a text file into an array per line: [CODE=ksh] integer SCRIPT_LINES=0 while read VAR1 VAR2 VAR3 VAR4 VAR5 do .... SCRIPT_LINES=$SCRIPT_LINES+1 set -A SCRIPT_${SCRIPT_LINES} ${VAR1} ${VAR2} ${VAR3} ${VAR4} ${VAR5} ... done [/CODE=ksh] This creates a number (SCRIPT_LINES) of arrays: SCRIPT_1, SCRIPT_2, SCRIPT_3, .... …

Member Avatar for scoude
0
172
Member Avatar for Elandir

Hi there, I have a little problem with commands. I know this is about shell scripting but i couldn't find a thread for commandlines. So i have this assignment to "display all the lines for tcp- services and udp- services and count the lines" and i honestly don't have an …

Member Avatar for Elandir
0
204
Member Avatar for naiksuresh

I am supposed to find a file recursively in a given directory. Rules are not to use find and recursive options like ls -R and grep -r. I can any other other option expect recursive. I had written the script using recursion. [CODE]#!/bin/csh foreach i (`ls -R $1 | grep …

Member Avatar for naiksuresh
0
105
Member Avatar for Newbi1984

Hi Daniweb members, I have two files that are not of equal dimensions and I need to match them on a unique key much like an SQL natural join. The files are space delimited and contain no headings. File 1 rs121 10001 A G rs125 10002 C T rs126 10003 …

Member Avatar for nezachem
0
922
Member Avatar for mojo1979

Hi, I'm pretty new to scripting so need some help... Basically I have a 1TB drive that hosts hundreds of .mdf files. What I want to do is search this drive for these .mdf files, zip them, and then delete the original .mdf file permanently. Any advice/help would be greatly …

Member Avatar for cfajohnson
0
100
Member Avatar for poobert

I'm trying to write a script that downloads and image off the net with wget. The script should save the file named as the date it was downloaded preferably with a suffix. Any ideas on how to accomplish this using wget?

Member Avatar for poobert
0
198
Member Avatar for mirasravi

I want to download a series of files say 150 files whose download links are similar but they vary only by a number. That is, the general download link is: [url]http://www.example.com/content/download_content.php?content_id=#[/url] where # is a number b/w 1 and 150. Which of the following works best? Share your suggestions too.. …

Member Avatar for mirasravi
0
238
Member Avatar for moroccanplaya

im new to shell scripting i want a simle script to configure the ip adress and add a default gw this is what i got so far [CODE] #!/bin/bash ifconfig eth0 "ipadress" route add default gw "gw adress" [/CODE] it does not recognise route ? can anyone help?

Member Avatar for moroccanplaya
0
128
Member Avatar for narlapavan

how to copy data from one system to another in solaris.. i have tried rcp,scp commands but some times its not working.... tell me if there are any other commands other than rcp and scp .

Member Avatar for ~s.o.s~
0
105
Member Avatar for manish250

hello all i hav a script when i print it's execution in some line there is #+ in the starting and somewhere there is #++.can anyone plz tell me about these

Member Avatar for cfajohnson
0
129
Member Avatar for k2k

sounds it should be simple but I wasn't able to google this out. basically i want to do something like [code] variable = `data` //from unix but I now need it for windows bat script [/code] [code] //windows set today = "date /t" //output is what i need, but wrong …

0
57
Member Avatar for Keidi

I am trying to call a php script through a shell script.The script is to be called as the run on receive directive of gammu-smsd.My php script executes as expected when I call it using[CODE]/opt/lampp/bin/php myvarsreader.php[/CODE].However on trying to run my script(From terminal): [CODE]#!/bin/sh PROGRAM=/opt/lampp/bin/php myvarsreader.php eval "$PROGRAM \"\${SMS_${i}_NUMBER}\" \"\${SMS_${i}_TEXT}\"" …

Member Avatar for ckoy
0
393
Member Avatar for k2k

set v1=%e:\file1\file0% set v2=%c:\file1\file0% set v3=%d:\file3\file4% cd %v1% and do something cd %v2% and do something cd %v3% and do something I just want to set a variable = path and cd to it later, since I have multiple pathes, i would like to cd to diff variables instead of …

Member Avatar for k2k
0
168
Member Avatar for b1izzard

Hi all, I want to compile the cobol program with a click of a button in toolbar provided if its compiler location and command to compile is specified. e.g [CODE] c:\cob>cobol hello.cob 'command line equivalent [/CODE] VB equivalent: [CODE] Dim command As String command = "cd " & app_path 'app_path="c:\cob" …

Member Avatar for b1izzard
0
182
Member Avatar for henryford

I need help counting the number of attempts to guess the right number. I can't seem to get the total number. I get an output like this 0+1+1+1+1+1 and so on. [CODE] secretNumber=$(( ((`date +%S`) % 59) +1 )) guess=-1 count=0 while [ "$guess" != "$secretNumber" ]; do count=$count+1 echo …

Member Avatar for shibblez
0
140
Member Avatar for sparkthesunoff

Could you please help me with this task? "Write a shell script which solve the task without the whereis command. The parameter ($1) is a file name. The script tells you which directories (maybe more than one) does the file exist in. (in the all-time PATH variable)" So far, i …

Member Avatar for rch1231
0
169
Member Avatar for CarterLangley

Hi all, I have a small problem. I need to be able to help the members of the organisation I belong to setup their email accounts. Now, I am at the best 2 1/2 hours drive away from them, so I can't drive there everytime somebody wants to setup an …

0
60
Member Avatar for f.damati

Hello everybody, I want to automate the installation of a software, this software could be downloaded in any directory. So to successfully install this software it needs the path of the setup file. So I am trying to write a batch script in order to find the full path of …

0
60
Member Avatar for manish250

hello all i m new to shell scripting.i have seen th code substitution like a=`ls -l` and a=23 R=$(a/23/bb) first time we use ` ` and second time we use $ . can anyone tell me Why so?

Member Avatar for rch1231
0
140
Member Avatar for stharmon

Hello, I have written a script to automate a software install. I am running the script as root, but need to su to another user to configure and complile the program properly. Whenever I do the shell script su's to the user properly but the scripts stops executing until I …

Member Avatar for rehm
0
4K
Member Avatar for rmsagar

I am trying to search files starting with the name properties.* inside a directory and assign to an array. When I try to print the array outside the loop, it shows empty. Inside the do loop, it prints fine. How will make this array global or take the values outside …

Member Avatar for cfajohnson
0
107
Member Avatar for rickylakhay

hi guys. i seem to be having a problem using ms dos. now manually i know how to connect to a network and upload files onto a server. im struggling to create a shell script that will automatically detect when an internet connection is present and then connect to it. …

Member Avatar for VulcanDesign
0
354
Member Avatar for marco83

I hope somebody could help me with a couple of things... First, I would like to search the /etc/passwd file for the full name of a user given his/her username. i've tried the following command: cat etc/passwd | grep -w '`whoami`' | cut -f 5 -d ':' of course that …

Member Avatar for JamesWhite..
0
221
Member Avatar for samarudge

Hey, So I have a *NIX box (CentOS 5.5) which runs a number of background processes, I leave it on 24/7 with just a terminal up on the screen (I don't have Gnome, KDE or any similar graphical frontend, just a prompt). Is there any way to get my background …

Member Avatar for shibblez
0
162
Member Avatar for apanimesh061

[CODE]function forcd { len=`wc -c /home/mint/AP/file2.txt | cut -c1-2` cutcmd=`cut -c4-$len /home/mint/AP/file.txt` cd $cutcmd } newvar=`pwd` clear echo "root"$newvar">" read cmd until [ "$cmd" == "exit" ]; do echo $cmd > /home/mint/AP/file.txt cutcmd2=`cut -c1-3 /home/mint/AP/file.txt` if [ "$cmd" == "dir" ]; then ls -l elif [ "$cmd" == "dir /p" …

0
45
Member Avatar for vegaseat

Suddenly I am interested in the tcl scripting language. Does anybody know a good website to learn the rudimentaries.

Member Avatar for gwmorris
0
3K
Member Avatar for programmer321

[code] Can any one guie me how to find yesterday's date (taking care of the leap years as well)in the format yymmdd using a shell script. Regards. [/code]

Member Avatar for cfajohnson
0
3K

The End.