1,978 Topics

Member Avatar for
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
203
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
241
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
132
Member Avatar for moraks007

Hi I new to shell scripting and need help to continue my work.here is the code I have so far. #!/bin/sh touch fileuseranswer echo "**********WELCOME TO GROUCHO MARX UNIVERSITY**********" echo Username: read i echo Password: read j Username="${i}:${j}" if ( ! grep -q $Username /$HOME/PhaseTest/userinfo ) then echo "Wrong Login/Passwd" …

0
54
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
107
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
133
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
59
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
396
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
172
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
183
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
142
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
171
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
62
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
63
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
145
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
111
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
357
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
225
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
166
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
47
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
Member Avatar for shyam miyatra

I want total months between two date (I/p) i want exactly four batch on the basis of date , for ex. i/p Start date : 01-JUN-2005 (or format can be 20050601 - YYYYMMDD) i/p End Date : 01-OCT-2006 or format can be 20061001 - YYYYMMDD) so in this scenario each …

Member Avatar for kevinkatia
0
858
Member Avatar for bojomojo

Hello, I have in a file some text, the area I am concerned in is: #COMMAND TRUE #COMMAND2 TRUE (anytext)1 #ENDCOMMAND I want it to be changed to #COMMAND2 TRUE 1 .. Please note that I dont want all "#ENDCOMMAND"s to be deleted, as there are some not associated with …

0
59
Member Avatar for rgpii

Hello, I had an idea for a script and I was going to get everyone's opinion if shell scripting was actually the appropriate medium to try and get this task accomplished. I want to check and see if a message board thread has been updated or not and then if …

Member Avatar for griswolf
0
67
Member Avatar for sparkle85

Hello, I need some help with the following script: [CODE] if ! [ -f ${APATH}/myfile.txt ];then echo $(date +%Y%m%d"_"%H%M%S)": Nu am gasit fisierul ${APATH}/myfile.txt" ps -fxu pin | grep "/usr/local/coreutils/bin/tail -f ${LOG_PATH}/x.log$" | awk '{system("kill "$2)}' cat ${LOG_PATH}/x.log | sed -n -e '/LONG/{x;1!p;g;;}' -e h > ${APATH}/myfile.txt /usr/local/coreutils/bin/tail -f ${LOG_PATH}/x.log …

Member Avatar for JeoSaurus
0
165
Member Avatar for alice06

Hi all 30 students have sent me their answers to me in folders, "[B]name1[/B]", "[B]name2[/B]", ..., "[B]name30[/B]". Each folder contains 2 outputs, "[B]output_a.txt[/B]" and "[B]output_b.txt[/B]" Now I have the correct answer "[B]correct_a.txt[/B]" and "[B]correct_b.txt[/B]" with me. I know that using the command diff, I can compare 2 files :: [CODE]$ …

Member Avatar for masijade
0
72
Member Avatar for novice20
Member Avatar for vaibhav1983
0
72
Member Avatar for polygon

I have a script called setuptex that is run on a terminal as [CODE]. ~/context/tex/setuptex[/CODE] I wanted to execute it from a bash script file instead of typing it each time on an interactive terminal. Since the dot operator and the source builtin command are similar, and I wanted a …

Member Avatar for vaibhav1983
0
513
Member Avatar for hackimist

My Problem starts when i borrowed my classmates USB flash drive i click a 'katrinascandal.vbs". . . Then not knowing anything i didn't think my drive was going to be infected with it Then i start opening "My Computer" then C: and i found out i have "Katrinascandal.vbs" So i …

Member Avatar for crunchie
0
585
Member Avatar for R2605

Hello, I'm a new python user and I'm trying to create a python program that will run on a targate and communicate with the terminal. The main idea is to run several commend and short programs and analyze the results. for example running those 2 commands: cd /home/user/folder ls | …

Member Avatar for R2605
0
118
Member Avatar for oceantech

Hi all! I have a directory with multiple text files of data. I have been trying to develop a loop to read through all the files, eliminate the first 88 lines (text header) and create a new file with only the data values. I have been all to write the …

Member Avatar for griswolf
0
120
Member Avatar for alice06

Hi all Please help me out. I plot a file [B]output1.txt[/B] in the following way :: [CODE]gnuplot> plot "output1.txt" using 1:2 with lines, \ plot "output1.txt" using 1:3 with lines[/CODE] [B]BUT [/B] now I have [B]many[/B] data files, [CODE]output1.txt, output2.txt, output3.txt, ....,....... ,output1000.txt[/CODE] I need to [B]plot[/B] each one of …

Member Avatar for alice06
0
3K
Member Avatar for k2k

i am trying to do something like [code] set var= ping google.com | find "Received = 4" if [var has something] then echo "ping well" [/code] something like that. in unix i can use the ` ` to execute shell command and set the returned value to the variable... can …

0
67
Member Avatar for Jamesbch

Hello, I'm kinda weird I know but I'm trying to encode my mp3 to a lower quality (for my mobile phone) with one line of shell (with bash). I'm wasting some more time as I would do by hand but I'm very interested. Here is my not-working line : [CODE]find …

Member Avatar for ole.tange
0
347
Member Avatar for nammy

I have 2 directories on Mac OS, one is the original directory and the other is an alias of the original directory. I want to list the contents of the aliased directory using shell script. I used the cd command to switch to the aliased directory, but it fails displaying …

Member Avatar for griswolf
0
101
Member Avatar for saransh60

hi friends i am new to shell programming and learning bourne shell....this is the syntax i am using a=10.0 b=20.0 c='echo $a+$b|bc' #wanted to add two variables in c echo $c this is the .sh file that i have created but when run in terminal,it is showing "echo $a+$b" not …

Member Avatar for shibblez
0
112
Member Avatar for alice06

Hi all I run my program [B]prog.c[/B] in the following way : [CODE]$ ./prog 1 > output.txt [/CODE] where 1 is a user defined initial value used by the program. But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in …

Member Avatar for shibblez
0
97
Member Avatar for nammy

Hello, I want to create a metapackage using the packagemaker command on my bash shell. The contents of the metapackage would be - Resources - package - some descriptors each to be installed at different locations. Could someone please help me out?

0
91
Member Avatar for shyam miyatra

I want to compare two float values in shell script, i.e. a = 0.1 b = 0.4 if ( $a < $b )then expression1.. expression2.. expression3.. fi if ( $a > 0.0 ) then expression4.. expression5.. fi could you please suggest me how to implement in shell script ?

Member Avatar for shyam miyatra
0
171
Member Avatar for john22

Hi, I am very new to Perl Scripting. I used Shell scripting before, but very little knowledge of Perl Scripting. I am given at task at my work: Here is info: I need to write a program that will listen to a port which will connect from Telnet. Also, the …

Member Avatar for richieking
0
466
Member Avatar for sofrdk

I need to put in some code in a dos batch to tell the user to enter 1, 2 3 or 4 on the keyboard. This runs the batchjob to put in a specific code into a website with JAVA. There is a little box with a user-id and i …

0
41
Member Avatar for testman84

what I'm trying is to write program that accepts list of user as its argument 1- If a user or more are given as arguments, the script should reset files permissions as follows: a. Directory ~/share to 750 (if it exists). b. All regular files inside ~/share to 744. c. …

0
150
Member Avatar for ravicisco2002

Dear All, I am new to korn scripts the below mention scripts for taking the system backup in NIM environment its looks okay but its not removing the old objects& system backup for more specific i am getting error on line number 83 Need help pls [code]#!/bin/ksh # # nim_mksysb …

Member Avatar for masijade
0
352
Member Avatar for whimsical1987

Hi I have openssl command in the script and I am providing key and iv for the command. I am getting the error [quote] ./encryCipher.sh Enter the input file name: words non-hex digit invalid hex key value [/quote] and this is my script [code] #!/bin/bash # Key for the openssl …

Member Avatar for shibblez
0
114
Member Avatar for Dark2Bright

Hi everybody, I am new to shell script. Please help me with this problem. I have a file test.txt with the content like this: [QUOTE] ! ((x5 * -1/3000) = x6) ((x5 * -1/2000) = x6)[/QUOTE] I have a shell script test.sh like this [CODE]#!/bin/sh while read line do echo …

Member Avatar for Dark2Bright
0
70
Member Avatar for sammiepooh

Hello, I am fairly new to this site and am new at studying unix/linux OS. Recently I had an assignment involving finding a script that had run an administrative task such as checking file systems periodically. With it, I had to take each line and describe in my own terms …

0
152
Member Avatar for whimsical1987

Hi I have openssl command in the script and I am providing key and iv for the command. I am getting the error [quote] ./encryCipher.sh Enter the input file name: words non-hex digit invalid hex key value [/quote] and this is my script [code] #!/bin/bash # Key for the openssl …

0
67
Member Avatar for Archangel714

I am very new to shell scripts and I was wondering if anyone could post a script which takes tv files from a TMP folder and places it to a different folder. The files and folder name syntax will be the following File to be moved TV show name - …

Member Avatar for Archangel714
0
107

The End.