- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 6
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Unix sysadm for more years than I'll admit to.
xhi, my task is to make a script, which displays the string read from console input in the form of 1 letters / line only. my code looks like this so far read string hossz=`expr length "$string"` for i in `seq 1 $hossz` do echo `expr substr $string $i 1` … |
|
I have a set of data imputed into a set of arrays as the following: for (int i=0;getline(file,(cities[i]),',');i++) { getline(file, countries[i], ','); getline(file, latitudes[i], ',') ; getline(file, longitudes[i]); } How do I sort the array line of latitudes and longitudes without changing countries and city it is associated with? |
|
I have a server with 35 clients and one time the server shutdown, causing choas for few hours to switch the server to another PC. How can I setup a mirroring server. I'm using Windows Server 2008, my application using MySQL database. Please advise |
|
Hi I need to connect to Telnet server for my university studies at the University of Birmingham but everytime I try to connect I get : "could not connect to the host on port 23". What can I do ? I know there have been other replies about a similar … |
|
I have made a program for hotel management. It has a problem that: In the Accounts function, it should reset all the flags of the registered members through the program. But there is a error that it does NOT. I have spent a lot of months, trying to debug this … |
|
I am able to read an external file but how do i retreive the data from the txt file per line? ex. text file has the following in it: dog cat rat how do i just display dog and then cat and then rat one by one? thanks. |
|
This is a website I designed a few years ago. The CONTACT and EMAIL SUBSCRIBE forms used to work, and they are broken. When I click on the Submit button, I get a server error saying "The server encountered an internal error or misconfiguration and was unable to complete your … |
|
inr main () { int x=3,y=4,z=4; printf("%d",z>=y>=x), } the answer is zero ..how?? |
|
Hello, I am fairly new to shell scripting. I see a lot of examples out there of how to find if a file has been modified within a certain period of time. What I'm looking for help with is a script that will run and I'm thinking check for the … |
|
Hello, I was wondering if you can help me, I am tryin gto achieve a specif output and I am stuck, any help would be greatly appreciated. [CODE]# cat file 1,2,3,4,5,6 1,,3,4,5,6 1,2,,,,6 # cat file | awk -F, '{print $1,$2,$3,$4,$5,$6}' | awk '{printf("%-1s %2s %2s %2s %2s %2s\n", $1, … |
|
I'm trying to make a binary calculator and I just can't find what's going wrong: [CODE]#include <stdio.h> void dec2bin(long decimal, char *binary); void dec2bin1(long decimal2, char *binary2); int binaryAddition(int,int); int main(void){ long int binarym1,binarym2,multiply=0; int digit,factor=1; long decimal; long decimal2; char binary[80]; char binary2[80]; printf("\n\n Please enter the first value … |
|
This is homework. I have to write a bash shell script using awk to process three delimited text files and produce a formatted report. The three files are as follows: [CODE]GRADES file John Bunyan:90:100:75:60 Maria Montessori:80:90:60:82 Alice Cooper:75:80:54:47 Harvey Mudd:89:45:89:95 PROJECTS file test1:30 test2:30 paper2:20 exam:50 LEVELS file A:89.5 B:79.5 … |
|
Hey Guys, I am trying to figure out how Linux determines whether an object in directory is a file or folder. There's got to be a property (I am guessing in Stat) that Linux references from which lets it know quickly. It's hard to find information on google because when … |
|
Hi Ok guys I'm trying to make my own environment variables but it's not working , please help me with this . Also please don't give me a link to something you got by googling , because i can search it myself but i need some simple explanation . |
|
Hi, I have two files: File1 (tab-delimited and two columns): Ex_efxb 0.0023 MSeef 2.3000 F_ecjc 0.3338 MWEEI -0.111 DDAIij 17.777 File2: MSeef 2.3000 F_ecjc 0.3338 I want to search the content of File one using the content of File 2 and then display the output as follows: Date of search: … |
|
Hello, How can I do it on a recursive way? (Function ''plus'' needs to call itself) [CODE]#!/bin/bash function plus { let GLOBAL=$GLOBAL+$1 } GLOBAL=0 n=$1 for ((i=1; i<=n; i++)) do plus $i done echo Answer: $GLOBAL[/CODE] Any help is welcome! Regards, trume |
|
I have Ubuntu Server 10.10. My setup is as follows: From the Ubuntu Server, I have an ethernet cable connecting to my Windows Computer, which has a wireless connection to my modem(and the internet). How would I be able to make it so that I can connect to the internet … |
|
Hi, I am trying to get my sorting script to work, and add to it. Here is my code so far: [CODE]#/bin/sh echo "Name Exam1 Exam2 Exam3 Total Grade" > final.txt awk -f 9.awk grades.txt | sort +4 -5 >> final.txt[/CODE] and then 9.awk is: [CODE]#BEGIN {printf "Name\tExam1\tExam2\tExam3\tTotal\tGrade";} { if($2+$3+$4>90) … |
|
Hi... i have A File And I Want to read the file and store all of its data in a single file what should i do... Please help.... A C Code Snippet would be very helpful |
|
i am trying to export display to my xp box from redhat.. problematic again. These are what I already have done: on redhat: #export $DISPLAY=:0.0 #export $DISPLAY=XXX.XXX.XX.XX ## my xp box ip #echo $DISPLAY #XXX.XXX.XX.XX #xhost + xhost: unable to open display "xxx.xxx.xx.xx" on xp: installed xming x11 server and … |
|
Hello, I wanted to see whether 2 directories are identical in terms of content. So what I did was tar the directories and then md5sum-ed them and then compare but the hashes were not identical. I tried to go inside each directory and md5sum-ed each file of each directory and … |
|
Hi all I hav written a very small shell script in bin bash & its not working. The script is :: [CODE]#!/bin/bash i=1.0 while [ $i -le 3.0 ] do i=`expr "$i + 0.5" | bc`; echo "i=$i" done [/CODE] The error is : [CODE]line 6: [: 1.0: integer expression … |
|
Hi, I am having a lot of issues using grep. I am trying to counts the number of lines which start with the letter “L”or “W” and end with the number 3. I can find and count the lines that start with L or W just fine, but I cannot … |
|
In a shell script, I want to 'spool' (record) the shell prompt & command typed alongwith its output into a file. eg: In the script, if I give a 'ls' command, the file should contain: [CODE] <<root@server ~>>$ ls a b c.txt <<root@server ~>>$ [/CODE] i.e. the command as if … |
|
Im working on an assignment and have run into a proglem that I cant seem to fix. With the following code I get the following error. "warning: passing argument 2 of strchr makes integer from pointer without a cast" [CODE]#include <stdio.h> #include <string.h> int main() { char buf[250]; char *chptr; … |
|
Hi Experts., i written One email recieving code by using Perl Modules with CGI. here i have getting one error [B]"Failed to connect to pop3.gmail.com at mail.pl line 14, <STDIN> line 3[/B]."., but i am trying to connect my gmail account and yahoo too., Otherwise let me know which module … |
|
Hello, I need help to write an output of perl script in a excel file on daily basis. I want to maintain a sheet of excel file like history data that file would contain the history output of all last runs. Although i have used perl formatting to write data … |
|
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 … |
|
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 … |
|
|
how do i mount a hardrive on Ubuntu via terminal? |