1,891 Topics
| |
Hi..Everyone... you know case statement very well... case $var in op1)... op2)... esac The problem is ,,, how can i specify the less than , greater than condition in case statement???????? case $var in -gt 100).... esac ..is not working... | |
Shel scrip to create automatic ROLLBACK statements for DDL's and put it into a separate file DDL's FILE Content ------------------ name:xyz ------------------------ --table 1 DROP table <tablename>; create table <tablename>; | |
Im reading a code for enhancement right now, but have little bit problem in understanding this portion of code in a file : my $dateAndtime = `date`; $dateAndtime =~ tr// /; print "Start : ".$dateAndtime."\n"; As far as i know the "tr" code is for deleting or replacing something in … | |
Hi everyone, I have a cpp code (Let's call it code1.ccp) that reads some data form a file named "InputFile1" and after a few computation writes the results on the file "OutputFile1".What I need to do is to run this piece of code for InputFiles2 to InputFile100 and write the … | |
how we can use getch function in shell script to use scan code | |
I have a shell script which mcrypts for me echo "Preparing..." mcrypt -F -c ./.mcrypt $ORIG echo "Moving..." mv "$ORIG.nc" $CRYPTED echo "Done" the php file calls it $COMMAND = './crypt.sh '.$CNAME; if ($_POST['cname']) { $output=shell_exec($COMMAND); echo $output; } i can see Preparing... Moving... Done but the file is not … | |
Hi all, How to remove duplicates in Unix. Suppose i have file like bellow 1,primary,a 1,secondary,b 2,secondary,c 2,secondary,d i want the output as 1,primary,a 2,secondary,c Please give me the solution for this command.. Thanks in Advance.. | |
Hello All, I have shell script which runs on unix box but recently we moved to windows box. I am completely zero in VB script I need you guys help to convert the below script to VB Thanks in advance for the help. CheckQDepth() { arch_log_file=`ls $arch_dir |grep $FNPARAM | … | |
I want to use awk to strip certain fields from the output of the Dell OMSA storage hardware diag tool. Typically the format of the output is: ID : 0:0:11 Status : Ok Name : Physical Disk 0:0:11 State : Online Power Status : Spun Up Bus Protocol : SAS … | |
BEGIN { via["AIRTEL_WHITE"] = 0 via["AIRTEL_WAP"] = 0 via["_321_44"] = 0 via["_321_555"] = 0 count=0 } { for(var in via) { if($5 ~ /var/) { count++ via[var] = via[var]++; } #print $5 } } END{ for(var in via) { if(via[var] != 0) { print var "->" via[var] } } print … | |
Hi, i m trying to ssh to a server and run a exe on that using a script file - runremote.sh All the prints generated by the exe on remote are being displayed on server 1 from where i have executed the script . But after sometime, the execution stops … | |
Hello I want to make two shell scripts but they shell scripts isnt exactly my language :P The following is all pseudocode The first script will run every say 5 minutes: if /tmp/media/sda1 exists or /tmp/media/sda2 exists or /tmp/media/sda3 exists or /tmp/media/sda4 exists then do variable storage=what ever above first … | |
Hello, I have a script that "validates" a ZIP file that look like this > AAA_20120801.zip => > x~back end~20120801.TXT > y~time in~20120801.TXT > z~heat_chamber~20120801.TXT > AAA_20120801.ctl My task is to compare its contents (i.e the list of files contained inside) with the control file that is provided inside the … | |
How can I get the path that the file is in? For example, my script is running in ~/Desktop/Projects/Shell but it doesn't know that. How can I get it to know that? Like DIR = DIR_IM_IN? | |
can any body give me the correct syntax of for loop to be used in vi editor in ubuntu..... i know like this....:- for (( initialisation;condition;increment )) do "statements for do" done | |
How do i make a autorun usb that executes a shell script that is on the USB drive? This would be only for my system so if there is something i have to enable, no problem (i imagine something like this would be disabled for security reasons) I believe the … | |
I have setup my own server(just a windows XP service pack 2 installed) now i want my friend to connect to it. I understand that there are 2 ways to do this. You can type in your CMD: telnet [IP Address] [PORT] Or you could type: telnet and then the … | |
I don't know if this is the right place for a post about Scheme, but i was wondering if anyone knew if there are loops and if statements in Scheme? (I am very new to Scheme, i know there are 'cond' statements, but i don't know if there are if's, … | |
Hello All, This may be the wrong place for this and if so I apologize in advance. I have been tasked with organizing a drive full of marketing assets on a mac server. It is currently in use so we have made a duplicate share so that any changes will … | |
Hi guys i first thank you for helps. and i have a script i use that for application authentication In fact the users must use your user name and password to use that App then after authentication of they user and pass passed they allow to use that application. and … | |
Hi, We have a file (e.g. a .csv file, but could be any other format), with 2 columns: the old value and the new value. We need to modify all the files within the current directory (including subdirectories), so find and replace the contents found in the first column within … | |
| Well, as you might know, when you are attempting to run a script from poweshell and have not used: Get-ExecutionPolicy You will get File C:\scripts\test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get- help about_signing" for more details. At line:1 char:19 + … |
Hi, I am trying to use mysql select query in a shell script but i need to know how to store a particular value from the output of the query in a script variable. my script file is given below. I need to store the value under field CheckSum in … | |
when trying to output the string of a variable to a text file, the string try's to run and therefore pops up like this, %localDrive% 2>>fileCompare.log 'C:' is not recognized as an internal or external command, operable program or batch file. Any ideas? | |
Hi, i'm using the following cmd to remove all lib files ending with .a find . -name "*.a" -exec rm -rf {} \; I have a file which i dont want to delete , say test.a, I just want to know how to make rm not delete test.a, but delete … | |
I have three javascript/jquery scripts and I need all of them. I am new in jquery so not able to add all three scripts. If I do all then one of them do not work. I need to put all three scripts into one. <script type="text/javascript"> $(function(){ // off $("#pgfor").twoitems({ … | |
Hi Everyone, Could any one provide some complex questions in C Shell Scripting as i need to conduct lab exam in scripting in 2 weeks, i have searched in google but i found only very small programs so could anyone provide some advanced shell scripting questions so that i could … | |
Hi, I am writing a script which will run a process in a while loop, i.e., user will execute `sh test.sh ` and the script will run a set of processes, I want to know how to kill the script which is having a infinite while loop in its contents. … | |
Hi, I've never used bash before, but am creating a file. Here's the skelton: while read line; do if [ -e "$line" ] then else cat > $name << EOF EOF cat > rails << EOF EOF fi command $name & done < projects.txt The error is: "line 55: syntax … | |
[code] #!/bin/bash if [ [ $a == $b + $c ] || [ $b == $a + $c ] || [ $c == $a + $b ] ]; then [/code] result: too many arguments What is the proper syntax? Thanks! |
The End.