1,978 Topics
![]() | |
I have a script that I have to interpret. I'm really new to shell scripting, however I have tried to explain the lines to the best of my ability. Can you please look at the script and let me know if I am on the right track (also point out … | |
Hi I need a Shell script that will download a text file every second from a http server using wget. Can anyone provide me any pointers or sample scripts that will help me go about this task ??? regards techie | |
Hi. I need to write a short script that's looking for a C files in a directory (based on whether it has a semicolon in it and a comment // or /*), check if the file ends with .c and rename it if it doesn't. I'm pretty much new at … | |
Hi guys, Can anyone help me with the following question? I am new to Shell Scripting and havent a clue how to use it. This is for a job I have applied for and i have never needed to use linux and have always been a Windows man. I probably … | |
Hello everyone. I need to write a Bash script to remove blocks of text from a given file. The idea is, the text to be removed will be marked by appearing between certain delimiter characters i.e. [code] Here's some text and ~this bit gets removed~, where tilda is the delimiter. … | |
Hi GURUS, Sorry to disturb you and take your time, I have a small job to do, it is - We will be taking back-up's regularly at certain time intervals according to the non - business hours. Suppose according to the business logic we scheduled a back-up job that takes … | |
Hi i am facing this problem, please help me in my korn script ------------------------------------------------------------- export $job_ids echo "#Message creation" >message-typing.typ chmod 777 message-typing.typ echo "orderParser:1:999:210:T" >>message-typing.typ echo "*REQUEST=FLOWTHRU;[B]JOBID=${job_ids}[/B];OLD_DD=20050629000000;%" >>message-typing.typ cat message-typing.typ ------------------------------------------------------------- Now the job_ids is a variable consisting of job id, and if u see i have exported this … | |
hi, i need to insert a character in a certain text file. i cannot change the original files so i have to work with that, luckily the files are written in a way that at the end of every second line a semicolon ; has to be inserted. How can … | |
hi experts, i'm new on scripting on sun solaris 8 sparc, need some advices. i have some data in a file like : 20061221 163826.485 20061221 163925.144 058.659 6123456789012 00000E8A 047 08 002 465 00010022 510105642138069 20061221 163915.163 20061221 163925.336 010.173 6123456789012 00000F4F 037 02 002 999 00010022 510103242202784 20061221 … | |
hey friends, I m in a process of automating Sudo test plan, where i need to invoke another shell within a shell automatically, then need to append a line into that script in sub-shell, then save it and quit from it..all automatically. I m able to do evrything but not … | |
Hi everyone, I am not really a scripter by nature but now have the need to create one that handles sequential numbering. Basically I need the script to create a sequential number everytime its run. I dont expect anyone to tell me how to do it as i want to … | |
Hello I have some files with the date included in the filename the format is limited_file_11012007.dat so this is the 11th January 2007 I have numerous files eg limited_file_23012006.dat limited_file_02122005.dat limited_file_23012006.dat limited_file_31032006.dat I want to pick the file that is the closet day after today, ie todays date would be … | |
Hi, I wan tto use 2 variables at same time in single loop. Like [I]for i in vs01a vs01b for k in 1 2 do rsh [COLOR=Red]$i[/COLOR] echo 'tail -20 /opt/oracle/admin/+ASM/bdump/alert_+ASM[COLOR=Red]$k[/COLOR].log' >> VS_logs.txt[/I] how to do it. because for vso1a it's ASM1.log whereas for vs01b it's ASM2.log. help me!! | |
Hi all, i'm new in linux environment and have a v. tough task. Please help me how to initiate it. give me some expample scripts.. the prob def is : * i am trying to write a full-screen utility, that displays the permissions of a directory and all the directories … | |
Hi Unix Gurus, I have written a shell script to unfreeze all frozen media in NetBackup. Here is the script written on HP-UX using ksh: *********************************************** set -x cd $HOME rm -f frozentest rm -f mediaserver cd /usr/openv/netbackup/bin/admincmd pbrun ./bpmedialist -summary | grep FROZEN | awk '{print $1 $2}' | … | |
Hi , Am new to shell scripting. I wanted to change user using shell script and i just dont know to do it. Thanks!, | |
Hi im a new one to shellscripting plz see the following code snippet var1=`sqlplus -S eot/eot <<- ! select ID from testhil1; quit !` echo $var1>ron cat ron vari=" " while read line do var2=` echo $line|wc -w |cut -f 1 ` vari=` echo $line ` done<"ron" echo $var2 echo … | |
Hello everyone. I'm a newbie in shell scripts. I'm trying to write a simple script that will archive a file from one directory to another directory I'm using sqlplus to generate the correct file name. The problem is when I try to use the paremeter from sqlplus it adds a … | |
hi , can ne one help wit it. I need to write a shell script which gives the process ids of all the process of previous day(if running or hung). | |
Hi, i have a file named file1 file1 contains ABCDabcdABCDabcdABCDabcd i want a shell script that will show the contents of file as ABCDabcd ABCDabcd ABCDabcd that means when a capital A is found it will break into another line thanks | |
hi, can anyone help me how to redirect sql query result to a file in shell scripting using sqlplus. Is the below code snippet corrct: sqlplus -s username/password <<- ! select * from testhil1; quit ! > rony3.txt | |
grep -v "connected" filename > newfile With regards to the use of grep and then output to a file as it was done in the sample above, are there any limitation to its use especially when the file is big? I have experience record truncation when it is output to … | |
if i m not clear in the previous post: i have a dat file with two columns. and a database table (oracle).One field of that file nd table r same. i want to match each value of tht column of that table with that of file.pick up the correspionding other … | |
hi i m very new to shell script. my prob: i have a dat file and a database table(oracle). one column of that table and dat file is same. i want to replace another column of that table matching the value of the column of the table with that of … | |
[COLOR=#000000]Can any1 please help me...[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]i'm really lost in using bash shell scripting...[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]and i got to hand this up on monday...[/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]please anyone teach me how to do this assignment... [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Please use basic things because i just learn the program … | |
I'm engaging in a little petty accelleration :P I just wondered if anyone knows a way to make a shell script simpulate keys typed on a keyboard? E.G. I press my xmodmap xbindkeys'd shortcut, it calls 'tag.sh p' and tag.sh somehow sends <p></p>(four right arrow keys) to the current window... … | |
Hello Everyone, I need help on a part of the script below.The purpose is to accept some filenames as command line arguments and count the number of characters,words,lines in each file, and the total of each of these 3 attributes. My output should look like this... [COLOR="Blue"]file 1 stats: Number … | |
Hi, I am new to shell scripting.So someone please do help me out.I have stored two dates in the given format below. cur_time=`date '+ %b%e%T'` time=`ls -lu f1 | cut -d "" -f6` I hope both these will show the dates in this format. for eg. Dec 23 10:10 Now … | |
i look fo it, but nothing found: i have a variable and want the reverse one example var1="test" var2 will be "tset" under linux shell i have no idea how to do this | |
Hi, Inputfile.log TDR 30 /data/data2/log1 TDRM 60 /data/data2/log2 # This command will match both lines $ grep ^TDR Inputfile.log # This command will match lines with TDR word appear anywhere in the text (but not TDRM) $ egrep -w TDR Inputfile.log How can I just match TDR that appears only … | |
Hello I have a var="STEPHEN,GRIFFITHS" how can i check to see if a variable contains a certain character, ie a comma (,) Thanks | |
Hi all... I have just started scripting in KShell and I have this code that extracts information out of a database under different fields. Now, if I further want to refine the data that is being extracted, say matching with a particular term under a particular field, can you please … | |
Hi Everyone, I need your assistance to write this script. The script should take an argument of a file. The script should be able to determine what permissions the owner, group and everybody has of the file passed in. The ouput should br displayed similar to this. READ WRITE EXEXCUTE … | |
Hi, Yesterday a friend of mine asked me about the use of $ at the end of the crontab command. His query is something like this. [B]15 3 * * * command [COLOR=red]$[/COLOR][/B] Can someone please help me with the use of $ at the end of this crontab command … | |
Hello everybody, I've got a small problem I need the following string to be split into it's parts: [code] ftp://user:pass@host/path [/code] the result should be smth like: [code] $USER = user $PASS = pass $HOST = host $PATH = path [/code] Somebody has help for me? Would be nice Alternative … | |
i need some ppl help me in the commmand for connect to my serial port...i face this problem a few days ago but stil unabe to get the solution. | |
Hi everyone, Sorry to be a bother but everything programming seems almost foreign to me. Im trying to write a shell script (using 'sed' and 'tr' etc.) which replaces a string of text with another. That is the easy part. The part Im stuck with is making it case insensitive. … | |
Hello all I am trying to create a script to do the following: I have a file which contains the following STEPHEN;CHRIS:PETER>JOHN| What i need to do is read this file in and be able to seperate the above names into variables based on the delims. ie Script something like … | |
Hi, I am new in shell script and I road this script, but it does not give the output I want. The output show look like this: Instance on [COLOR=Red]fac1[/COLOR] [COLOR=Red]inst1 [/COLOR]instance Instance on [COLOR=Red]fac2 inst2[/COLOR] instance Instance on [COLOR=Red]fac3[/COLOR] [COLOR=Red]inst3[/COLOR] instance Here is the script: [code]INSTID="inst1 inst2 inst3" FANCID="fac1 … | |
Can any1 suggest me, how to implement the "wc" word counting utility through bash shell script, i.e how to design a script working similar to "wc" command ??? Need it desperately, with all relevant options like -l, -c, -w ... | |
Hi Guys, I'm quite new to shell scripting. I would like to create a script to the following: 1. dbf 2. Print "Filesystem" "kbytes" "used" "avail" "%used" "Mounted on" values where %used >= 80%. 3. email output to user([EMAIL="you@email.com"]you@email.com[/EMAIL]) 4. The script should run once a day via cron every … | |
Everything works in this script with the exception of actually copying the files down from the W2K03 server to the user's Desktop\Shortcut folder. The Shortcut folder does get created by nothing gets copied to it. I have checked all the folder and file rights and they are correct. I am … | |
Can anyone help me in implementing a program which contains a routine which is similar to getpid() in functionality, but there should not be use of getpid() in the program. Please reply as soon as possible. | |
Greetings, I am trying to create a script that does 2 things. I imagine this can be done in 2 or 3 lines. 1. ssh to a server 2. execute the passwd command here is what I am trying - ssh -l username server passwd Once the script ssh's to … | |
hi! My boss told me that the script should DISPLAY ERROR if FAILED_LOGIN_ATTEMPTS is greater than 3... HOW should I do THis? PLease talk to me like im moron, im just a beginner... or please give a sample code to do this.. thanx a lot... HERE's THE SCRIPT: export ORACLE_SID=ohkrm92 … | |
I have an options file of the following format [code] option1 = value1 option2 = value2 ..... ; variable number of options ..... page_size= pagesize1 ;Note there is no space between page_size and = page_size= pagesize2 page_size= pagesize3 [/code] During a regression test I want to extract the values for … | |
Hello everyone, I am a beginner to shell script . I had to modify the following script and i get the following errors : sag.sh[11]: SAG: not found mv: cannot create /sag_0609131449.txt :Permission denied #!/bin/ksh LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/export/home/oracle/app/oracle/product/8.1.7/lib export LD_LIBRARY_PATH export ORACLE_HOME=/export/home/oracle/app/oracle/product/8.1.7 export STOCK=/export/home/oracle/app/oracle/product/8.1.7/bin export ENT=/home/atw11w99/ent/uc5 #SAG =$SAG:/home/atw11w99/ent/uc5/sag SAG =/home/atw11w99/ent/uc5/sag export SAG … | |
Hi all, Can anyone shed some light as to why this is not working? for i in `cat wordlist.txt | dos2unix | sed -e 's/ *$//'` do sed -e 's@$i@<a href=http://www.domain.com>$i</a>@g' article.txt done I've also tried: perl -pi -e 's@$i@<a href=http://www.domain.com>$i</a>@g' $file The worlist.txt file consist of words one line … | |
I am new to scripting I want to parse a string in a loop eg A:B:C:D E:F:G:H and put them in different variable attr1 = A attr2 = B attr3 = C attr4 = D . . /* do processing with attr1, attr2, attr3 and attr4 */ then go to … | |
Greetings, Hey guys, I am trying to make a shell script that will scan for a certain 5 lines of text in a file, modify it by adding two lines in the middle and replacing that section of text in the file. For example read rc.conf for: Line1 Line2 Line3 … |
The End.