Programming :: Converting A .bat Script To Sh Script To Work In Server?
Jul 21, 2011
I am new to scripting world and i have been assigned the task of converting some bat scripts to sh scripts because we migrate from Windows to Linux server.find below the .bat script.
rem *************************************************************************************
rem This script is used to get r2devices files.
rem
[code]...
View 3 Replies
ADVERTISEMENT
Mar 13, 2011
im setting up an external hard drive for movies and music to connect to my ps3. the majority of the movies work just fine (they are in mpeg format). but over half of them are HD and take up somewhere in the range of 5 to 8 gigs. since ps3 only supports fat32 externally i can only have file sizes up to 4 gigs. so i need to split the oversized videos into two parts, but i dont know how to do that. ive tried using avidemux (which is a pretty cool program and actually taught me alot) but i cant seem to get a correct format that will work with the ps3. playstations website listed several formats the ps3 is supposed to recognize but none seamed to work for me (maybe i did it wrong though).
View 3 Replies
View Related
Jan 30, 2010
I am taking an input from the user for free and Used capacity in a disk. I wish to convert Input entered in MBTB to GB and this is how i am doing it.
Code:
<some code>
print "Enter Total disk space";
$tot = <STDIN>;
convert($tot);
[code]...
how do i pass the value of conv[0] after conversion back to $tot or $use such that they contain only value which is in GB?
View 3 Replies
View Related
Jan 22, 2011
I'm working on a project where I am converting a C file to C++. I have worked out 99% of the errors but there is still one lingering one that I cant seem to figure out. I get the following error when compiling with g++
Code:
mscp.cpp:749: error: invalid conversion from const void* to move
mscp.cpp:750: error: invalid conversion from const void* to move
[code]...
View 5 Replies
View Related
Apr 3, 2011
My problem is to convert an odt file to pdf using php. I wrote an article in odt and I'd want to download it in pdf from my site. I know "fpdf", but it doesn't convert from odt. Someone says to convert from odt to html then to pdf... but some others says NO! Well, do you know a way? (may be also different from odt to pdf, e.g. from latex to pdf).
View 12 Replies
View Related
May 17, 2011
I've been converting some C code to assembly for my homework; it was going well but I'm having trouble with a for loop for hours. I could not understand where is the problem and decided to ask. I'm posting the part where I'm having trouble of my C-code and assembly-code; every other part of codes act same and the variable values are same. I'm waiting this two codes to act same, but they don't.
Code:
mov ebx, [result]
mov eax, [i]
mov ecx, [ebx+eax]
mov [j], ecx
mov [ebx+eax], byte '.'
_loop:
mov ebx, [result]
mov eax, [i]
inc eax
mov cl, [ebx+eax]
cmp cl, 'Z'
je _continue
mov ebx,[result]
mov eax,[i]
inc eax
mov ecx, [ebx+eax]
mov [k], ecx
mov ebx, [result]
mov eax, [i]
inc eax
mov ecx, [j]
mov [ebx+eax], ecx
mov ecx, [k]
mov [j], ecx
inc dword [i]
jmp _loop
_continue:
Code:
j=result[i];
result[i]='.';
for(;result[i+1]!='Z';i++){
k=result[i+1];
result[i+1]=j;
j=k;
}
View 10 Replies
View Related
Jul 5, 2011
I wrote the following as our developers won't do it for us! The rest of my programming is in PHP, any ideas on how I can get this into php?I'm in the middle of writing a reminder system which involves importing the customer data and sending out reminder emails.All the script below does is download the current report $FILEIN, compare field number 6 ($DATA) with the date($DATE), if there is a match, it checks each line in the prescription_skus.csv to see if there is a match with field number 1 in the current report. It then outputs the entire line to $FILEOUT
Code:
TODAY=`date +"%Y-%m-%d"`
FILEIN="export-"$TODAY".csv"
[code]...
View 7 Replies
View Related
Jul 16, 2011
I'm writing the Diffie-Hellman key exchange system using GMP to handle big integers. For the most part, everything works. I can convert the string to mpz_t, set up the keys and everything, and encrypt it fine. Its the decrypting I'm having issues with. What I'm using is mpz_xor() for both. To encrypt I'm doing mpz_xor(buffer, mpz_of_text, secret_key), and to decrypt I'm doing mpz_xor(buffer, mpz_of_cipher, secret_key).
For one character, it semi-works...it'll decrypt it fine, but it'll return it as it's ASCII value (i.e.: if I encrypt "A", it'll decrypt it as 65). Which, I can easily just do sprintf(decrypted_buffer, "%c", 65) for example and be fine. But, when I'm sending text bigger than one character, the encryption for AB gives me something like 1061043 after running the decrypting xor on it.
Has anyone ever done this before or can point me in some directions? Perhaps other algorithms to try? I know XOR isn't the most secure encryption method to use, but at the time I wasn't sure what else to use. I'm really just having a hard time trying to convert a mpz_t to a character string. I've looked at mpz_get_str() and it works before running encryption (i.e.: using mpz_set_str() to create a mpz of a string, then calling mpz_get_str() to change it back). Maybe my XOR method is wrong? Here's the code I'm using:
Code:
/**
* str2mpz()
* b The current buffer of text to convert [in]
* m The mpz_t variable to store converted text [out]
[code]....
View 9 Replies
View Related
Mar 25, 2010
I'm a C / assembler programmer so am not use to C++, which I need to use. Basically I'm using my own versions of memcpy, but for long and int rather than char. It's for fast graphics. So I have a char array which I copy to another array. But I copy as either longs or ints, much faster. for example
Code:
void * fastmemcpysprite (void *destaddr, void const *srcaddr, size_t len)
{
[code]...
View 3 Replies
View Related
Jul 21, 2011
#!/usr/bin/perl
print "Input File Name: ";
$filename = <>;
$filename =~ s/s+$//;mkdir "$filename";
[code]....
View 3 Replies
View Related
Mar 4, 2011
I have a vector of octets that needs to be converted to a std string. I'm currently doing it this way:
Code:
stringstream ss;
for (unsigned int i=0; i < data.size(); i++
{
ss << data[i];
}
string s_data = ss.str();
This works, but is there any better way to do it?
View 2 Replies
View Related
Apr 27, 2011
I have to write a code that converts a sequence of 1's and 0's(block) into their equivalent hexa number and copying to another array(byte). but this sequence is not always of length 8 and you are required to send strlen(sequence)%8 bits back into the string. So i've written down this code and it works well with the sample input but fails in the real program.
Code:
int Convert_encode( char * block,unsigned char * byte)
{
int len,iter,i,j,k,sum;
char * temp=(char *)malloc(4*sizeof(char));
len=strlen(block)/8;
[code]....
View 7 Replies
View Related
Aug 2, 2010
I need to convert strings in the format YYYYMMDD to dates so I can perform date arithmetic.
View 4 Replies
View Related
Apr 9, 2010
I am in the process of learning some scripting, however I am running into a roadblock in specifying a certain time format in the array. Ideally I would like to use Here are the lines of text that I am interrogating:
1123,3/25/2010,00:14 Thu,33229
1124,3/26/2010,13:30 Fri,33230
1125,3/27/2010,04:49 Sat,33231
[code]...
View 2 Replies
View Related
May 5, 2011
I have log files that everyday are downloaded from my webserver in the format: Code: samplesite.com.xxxxxxxxxxx.gz xxxxxxxxxx is a 10 digit epoch time. I am trying to figure out a way in batch to:
1. find all of exisiting files containing the pattern (after the first run it will only be one a day)
2. Isolate the epoch string
3. convert the epoch string to human readable date/time
4. rename the original file as samplesite.com.mmddYYYY.gz
View 2 Replies
View Related
Feb 12, 2010
We've converted several older unix servers from HP UX to VM's running RHEL 5.The database applications and everything else run great, however we have a group of programmers who need to be able to use character based, wyse60 sessions using tiny term. I'm having trouble making the cool elements in bash work in this emulator, and even more trouble simply replicating what was available in the /sbin/sh used in HP UX?
View 1 Replies
View Related
May 22, 2010
We moved over from Cpanel using Exim. I was wondering if anyone knew of way to convert the mail so when a user logs in they get to all their mail in their folders. I notice exim has a ton of folders while postfix creates files that act like folders which contain all the emails. I sent up 1 of the emails into the our mail folder that was created by Exim and it can be Subscribed to in Outlook with imap but the emails inside doesn't show up. They both appear as text files so I don't know what the difference is.
View 1 Replies
View Related
Mar 25, 2016
I set up my Debian box as a HTPC but am moving it to my closet and using it as a NAS now, so I want to make it headless since there won't be a monitor connected to it.What's the cleanest way to nuke the desktop environment? 2nd to reinstalling, that is (although that may not be a bad option since may home directory is in another partition).
View 1 Replies
View Related
Sep 7, 2010
I have a sendmail alias configured to forward mails to pagers and it was working fine . The mail relays suddenly start converting a mail address of pager into a normal mail(outlook) format address. Say , instead of forwarding a mail to [URL] Provided no configuration inside the mail directory was changed.Which file is responsible in converting the mail-addresses? Is there any other problem with my mail-setup?
View 5 Replies
View Related
Jul 21, 2010
Could anyone give the steps for converting a logical volume to a raw disk to mount Oracle ASM Instance on it?
View 2 Replies
View Related
Jan 29, 2010
I have managed to create a HTML file inside python code,convert this to a PNG file through a Python script ?
EDIT: Details added: I have a python script which generates map-legends in the form of an html file. The legend generated have to be pasted on a map which is in a png format. A png format file can be pasted on another png format file easily. But because the legends generated are in a html format I cannot paste it on the map file !!
EDIT: Details added: I did Googling first but it resulted in various soft wares for above purpose which I don't want !!
View 12 Replies
View Related
Aug 9, 2009
I'm writing a PHP program. I've encountered a problem; in the following code I try to pass $_POST['delete'] which is an array as the value of a hidden input to some form, but it doesn't do so.there's something wrong with converting PHP array into HTML array. I'm sure that $_POST['delete'] is not null and is a real array.
echo '<input type="hidden" name="delete[]" value="'.$_POST['delete'].'" />';
View 4 Replies
View Related
May 16, 2011
i have a server program which accept multiple client connection and am using polling. like every 2 secs it will look to client whether any data is received after it binded. i have used setitimer but there is runtime error i got.. the server accept all client connection but doesn't execute any msg which client sent.
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netdb.h>
#include<unistd.h>
#include<pthread.h>
#include<string.h>
[Code]....
View 1 Replies
View Related
Sep 28, 2010
A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit
View 4 Replies
View Related
May 22, 2011
Does anyone have some material about statistics using ubuntu / linux server, or a text which generally describes the ubuntu server?I need urgent, i'm writing specialization work about administration apache and ftp server on ubuntu 10:10 server, so I need something for the conclusion.
View 7 Replies
View Related
Aug 29, 2010
I need to setup a Linux VPN server at work for resources' sharing, I currently have a server running CentOS 5.4, and tried endless tutorials on the web, but to no avail, and can't find where the logs are kept for the VPN server to check where the error is. But all my attempts to try to connect keep failing.
View 9 Replies
View Related
Apr 11, 2010
I am trying to do a https access with virtual hosting with apache.
But when I install mod_ssl rpm httpd server does not start again
I am stumped
httpd -t shows syntax is OK
View 5 Replies
View Related
Mar 1, 2010
This code will execute fairly well, however, if you enter multiple values that are not A/a or b, 1 or 2, then when the program resets, cin does not behave normally. Instead of waiting for input, it acts as if it has already been given input, and the input is the next character from the one entered.For example, entering "345" and submitting it at the (cin >> a line will individually pass the values 3, 4, and 5 through the if/else and switch statements, rather than only inputting the first value, 3, or all the values, 345.
If you enter, for example, "3343634563456345", then it will pass through the do{}while(); loop 16 times, with each pass having a = to the next character value. The cin >> a; is performed, and this is verifiable in GDB, however it never asks for input from stdin, and instead gets its input from somewhere else. How can I observe that, and what is going on?Furthermore, if you enter "cdefghijklmnopqrstuvwxyzab", it will pass through 25 times, and stop at a, which goes through the switch, and ends at a case statement that does not adjust the false value of mreset, thereby allowing the program to end.
View 10 Replies
View Related
Mar 16, 2010
I am looking to be able to connect to an IRC server in a C program. I have followed some instructions from an old book I have however it doesn't seem to be working. I've tried connecting to localhost on my ssh port and it still doesn't want to work. This is what I have so far as a piece of skeleton test code:
Code:
#include<sys/types.h>
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<unistd.h>
#include<netinet/in.h>
#include<arpa/inet.h>
[Code]....
View 1 Replies
View Related
Nov 4, 2010
\Actually i lost the login details of my server so im recovering it in rescue mode.what i want to ask here is if i restarted my server what i need to do in order to work as it was before.on my server samba and dhcp server is configured.will my client users can access there network if login page comes or i need to do something else such as restarting services or not.
View 1 Replies
View Related