Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
6
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #1K
~17.5K People Reached
About Me

Unix sysadm for more years than I'll admit to.

Favorite Tags

42 Posted Topics

Member Avatar for zortar

You know the answer already. What's the difference between the two occurences of $string?

Member Avatar for zortar
0
301
Member Avatar for VUEKID

Instead of loading the fields into seperate arrays why not load them into an array of structs?

Member Avatar for linux
0
184
Member Avatar for jerryy

Have you looked at this? [Click Here](http://technet.microsoft.com/en-us/library/ff182326%28v=ws.10%29.aspx)

Member Avatar for shibblez
0
84
Member Avatar for portoman

SSH - secure shell. Telnet is generally considered to be 'a bad thing' as the username and password are not encrypted. Try PuTTY, available from http://www.chiark.greenend.org.uk/~sgtatham/putty/

Member Avatar for shibblez
0
219
Member Avatar for daksh1998

Strange. It works for me using GCC and Linux. puts("Before update"); system("hexdump -C data.file"); f=fopen("data.file", "r+"); while(fread(&payment, recsize, 1, f) == 1) { payment.pay=7; fseek(f, -recsize, SEEK_CUR); fwrite(&payment, recsize, 1, f); } fclose(f); puts("After update"); system("hexdump -C data.file"); I've used 7 instead of 1 so that the update is easier …

Member Avatar for shibblez
0
396
Member Avatar for rae08
Member Avatar for zalel

A few quick thoughts - The first two lines of the script look like this [CODE]æ²utxtåÖ#!/usr/bin/perl ##############################################################################[/CODE] Are the characters before the hash (#) in the first line actually in the production version of the script? If so, they need removing. Is PERL /usr/bin/perl? Is the script executable?

Member Avatar for shibblez
0
207
Member Avatar for srinath1

Because what you think is happening isn't. The comparison is carried out left to right : Result z>=y 4>=4 1 (TRUE) 1>=x 1>=3 0 (FALSE) hence the result of 0

Member Avatar for sharathg.satya
0
179
Member Avatar for PyroPlasm
Member Avatar for gcclinux

[CODE]cat file | awk -F, '{printf("%-1s %2s %2s %2s %2s %2s\n", $1+0, $2+0, $3+0, $4+0, $5+0, $6+0)}'[/CODE]

Member Avatar for Fest3er
0
163
Member Avatar for EdwardVX

In lines 26 and 27 you're casting a string to a long. What you probably mean to do is [B]convert [/B]the string to a long. I think you'll find that atol() is what you need. The reason that there a no error is that it's doing what you asked for …

Member Avatar for shibblez
0
119
Member Avatar for iamthesgt

There are so many problems with this script I don't know where to start. I tried to correct it and came to the conclusion that it would be easier to rewrite it from scratch. Have a look at a AWK tutorial - [URL="http://www.grymoire.com/Unix/Awk.html"]http://www.grymoire.com/Unix/Awk.html[/URL] seems to cover the basics pretty well.

Member Avatar for Fest3er
0
314
Member Avatar for BLUEC0RE

Have a look at this, which covers the basic pretty well [URL="http://web.cs.wpi.edu/~rek/DCS/D04/UnixFileSystems.html"]Unix Filesystem Organization[/URL]

Member Avatar for shibblez
0
564
Member Avatar for alaa sam
Member Avatar for perly
Member Avatar for trume

Put [CODE]set -xv[/CODE] as your second line. You can now see what is happening as it executes. A clue - [CODE]plus $i[/CODE] doesn't do what you think it does.

Member Avatar for griswolf
0
89
Member Avatar for tomtetlaw
Member Avatar for Pandamonium
Member Avatar for rohan_k
Member Avatar for abhimanipal
0
244
Member Avatar for k2k

Don't set DISPLAY, putty does this as it connects, typically to localhost:10.0

Member Avatar for shibblez
0
123
Member Avatar for johndoe444

Neither, they're both correct. A tar file contains metadata as well as the original data, so if the metadata doesn't match then the checksums won't. If you look on wikipedia for tar(file format) you'll see that the metadata includes stuff like creation data fro both the files and the tarball

Member Avatar for johndoe444
0
112
Member Avatar for alice06

You're right, the problem is that test only does integer comparisons. How about [CODE] #!/bin/bash i=10 while [ $i -le 30 ] do i=`echo "$i + 5" | bc` j=$(echo "scale=1; $i / 10" | bc) echo "i=$i j=$j" done [/CODE] and use j instead

Member Avatar for alice06
0
92
Member Avatar for Pandamonium
Member Avatar for tuse
Member Avatar for tzmen23

It's line 18 [CODE] chptr = strchr(buf, "\n");[/CODE] "\n" is a string, hence a pointer, rather that an integer. if you change it to [CODE] chptr = strchr(buf, '\n');[/CODE] that should fix it

Member Avatar for shibblez
0
120
Member Avatar for senthilamp4

It's because gmail uses SSL for POP3. Take a look at this - [URL="http://forums.devshed.com/perl-programming-6/how-to-get-gmail-mail-by-mail-pop3client-in-perl-555889.html"]http://forums.devshed.com/perl-programming-6/how-to-get-gmail-mail-by-mail-pop3client-in-perl-555889.html[/URL]

Member Avatar for shibblez
0
139
Member Avatar for realoneomer

[CODE]http://search.cpan.org/search?query=WriteExcel&mode=all[/CODE] I've successfully used Spreadsheet::WriteExcel in the past.

Member Avatar for d5e5
0
585
Member Avatar for henryford
Member Avatar for rmsagar

It's because when bash creates a subshell for the pipe. A new variable is created in this subshell, updated on each iteration and then discarded when the subshell terminates. The simplest answer is probably to use ksh.

Member Avatar for cfajohnson
0
110
Member Avatar for Josue198s

This may be of use - it normally works for me. First plug in the USB device and check that it has been seen. [CODE] [shibblez@server mnt]$ dmesg usb 1-5: new high speed USB device using address 12 scsi9 : SCSI emulation for USB Mass Storage devices Vendor: SanDisk Model: …

Member Avatar for JamesWhite..
0
216
Member Avatar for samarudge

Modify the scripts to write to syslog using logger. You can then configure syslogd (syslog.conf) to redirect these messages to the console.

Member Avatar for shibblez
0
165
Member Avatar for questionX

You should be using the account password for user1, not the root password. As for connecting as root noramlly ssh is configured to reject root logins via ssh.

Member Avatar for tlkummell
0
223
Member Avatar for dangari
Member Avatar for dangari
0
176
Member Avatar for bio-grad

Add [CODE]or die $![/CODE] to the end of line 14. This will show what error, if any, is being encountered on the open.

Member Avatar for bio-grad
0
3K
Member Avatar for alice06

I'm assuming that all of plots are identical. First you need to set up a template file containg the command for gnuplot like this. [CODE]# template.gnuplot set term png set output "OUTFILE" plot "DATAFILE" using 1:2 with lines \ "DATAFILE" using 1:3 with lines [/CODE] Now you can plot the …

Member Avatar for alice06
0
3K
Member Avatar for koduruabhinav
Member Avatar for koduruabhinav
0
169
Member Avatar for Jamesbch

For reasons I can't fathom basename doesn't appear to work with xargs, even though the {} [B]is[/B] correct. The command below works for me, but I haven't dealt with the case where the filename has spaces in it. [CODE] [B]bash syntax[/B] find . -iname "*.mp3" -printf "%p /mnt/sda1/tmp-zik/%f\n" | xargs …

Member Avatar for ole.tange
0
347
Member Avatar for avataralien
Member Avatar for saransh60
Member Avatar for alice06
Member Avatar for ravicisco2002

A couple of questions Why is stderr redirected to /dev/null in line 80? What error do you get in line 83?

Member Avatar for masijade
0
352
Member Avatar for whimsical1987

The End.