Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: santanudas
  • Content: Threads
  • Order by date
  1. santanudas

    converting HTML markup code to text

    Greetings all, I'm a python newbie, so my apology for being silly (if it is) with my question. I was trying to convert converting HTML markup code to human readable text and the sample line I took form the iTumes music library, which is a .xml file. import os, sys, string import urllib...
  2. santanudas

    Difference of days in terms of Year, Month Week and Day

    Greetings all, As said in the subject line, trying to write a script to print the number of years, months weeks and days between two given dates. Does anyone know how to do that? So far I've tried Date::Calc module, which returns the difference as number of days but then I'm stuck converting...
  3. santanudas

    worldtime clock [AS2/AS3]

    Hi people, I'm very very new in this flash world (just a 2 weeks old of experiences, so far) and I found the ActionScript (especially v3) is really cool. So I started with making clock, not the the one which takes time off the system clock but a clock with different timezone(s). I didn't find...
  4. santanudas

    Executing Unix command within Perl

    Hi guys, I was trying to execute some Unix commands from within perl but getting error; especially when the command itself got a single quote in it. Say e.g. if I want to pipe through sed like this: my $DIR = `pwd -PL | sed '\,^, s/.*\///'`; I tried with backslash but didn't work. Any idea how...
  5. santanudas

    remote login

    Hi all, I use this script: HOST=`seq 11 18 | gawk '{printf("node%03i\n",$1);}'` for ix in ${HOST}; do ssh -T ${ix} << EOF some commnds ....... ...... exit; EOF to remotely login on to all of my nodes, say e.g. from “node011” to “node018”. The script runs fine, I can login and do stuff on...
  6. santanudas

    finding nth array element

    Hi all, What would be the PHP equivalent of this Perl construct: $ENV{"PATH"} = "/bin:/usr/bin"; my $ls = `/bin/ls /path/to/dir/some_dir/`; my @images = split /\n/, $ls; my $name = "some_file.jpg"; my ($position, %pics); $pics{$images[$_]} = $_ for 0 .. $#images; $position = $pics{ $name }...
  7. santanudas

    Array with &quot;long file name&quot;.

    Hi Guys, I was trying to use the output of "ls" command to fill an array with. This is the sample code I'm using: #!/bin/bash # cd /Volumes PART=( `ls` ) echo; echo "Directory listing:" echo "------------------"; ls echo; echo "The array using ls:" echo "----------------------" ix=0 while...
  8. santanudas

    Bash script glitch

    I’ve got another problem with bash script. If I do this on the console I get it write: [MacUsers@pcge ~]$ find ~/scripts -type l | grep iTest /home/MacUsers/scripts/iTest File [MacUsers@pcge ~]$ find ~/scripts -type l | grep iTest | sed 's/ /\\ /g' /home/MacUsers/scripts/iTest\ File But running...
  9. santanudas

    my first php script - pls help!!!

    Hi people, I'm a complete newbie in this php world and was trying a very simple thing to start with. But can't see that I'm doing quite well. These are the things I'm trying to do: list the directory content using UNIX “ls” command split the out put put the values in an array display the...
  10. santanudas

    Shell commands on OS X

    Hi guys, I was trying to write a small bash script, which reads the iTunes’ Library.xml file and then print the name of the songs based on the “given” artist. In the end, I came up with something like this: cat ~/Music/iTunes/iTunes\ Music\ Library.xml | tr \\n ' ' | sed 's%</dict>%\n%g' |...
  11. santanudas

    Bash script on OS X

    Hi guys, I was trying to write small bash script, which reads the iTunes’ Library.xml file and then print the name of the songs based on the “given” artist. And I came up with something like this: cat ~/Music/iTunes/iTunes\ Music\ Library.xml | tr \\n ' ' | sed 's%</dict>%\n%g' | sed -e...
  12. santanudas

    URI encryption

    Hi all, How to encrypt the URI string (or maybe put some extra garbage in it) so that it’s not easily understandable when passing through a Perl/CGI? Say like, if I want to pass an URI like this: <a herf=”/cgi-bin/xyz/xyz.cgi?MODE=ABC&DIR=$blah&FILE=$blah.txt”> and on the next page this is...
  13. santanudas

    PERL array handling

    Hi guys, How can I determine the position of an array element if the value is known? For example, if we have Then print $sss[3] will return “Wednesday” I just need to do the other way round, i.e. if I know the element “Wednesday” then how can I return 4? Thanks in advance. Cheers!!!
  14. santanudas

    DHCP server behaviour

    Hi guys, I'm a bit confused with the behaviour of my dhcp server. I'm just wondering if you can help or explain. To summarize every thing else in the dhcpd.conf file is under our own subnet section, like this: subnet 1.2.3.0 netmask 255.255.255.0 { deny unknown-clients; authoritative; ...
  15. santanudas

    shell script - pls help

    hi guys, Need to write a bash script which will increment the numbers by 1 but the number should be with leading zero, i.e. 01, 02, 03 etc. So, if I do #!/bin/bash s=`seq -w 5 12` for i in $s do echo $[i+1] done not returning the desired result. I tried replacing “$[i+1]” with “$[s+1]” and...
  16. santanudas

    Burning Disk image for Windows

    Hi, Since few days I'm trying to get a work around to burn a CD on my Mac, off a disk image which I created from a folder. After burning, I get it perfectly okay on Mac but on Windows it appearing as a empty (not *BLANK*) disk. I suspect that it’s creating a HFS+ formatted disk and that’s why...
  17. santanudas

    loading/unloading frames

    Hi, I need a help. I got a page with nested frame set, like this: <FRAMESET rows="59,*" cols="99%" frameborder="0"> <FRAME name="titlebar" src="header.html"> <FRAMESET cols="190,99%" rows="*" frameborder="0"> <FRAME src="leftbar.html" name="leftbar" noresize> <FRAME src="rightbar.html"...
  18. santanudas

    rndc: connect failed: connection refused

    Hi guys, I got a problem: rndc not connecting ‘named’ I’m using FC-2 and I got a slave zone. ‘named’ service is running but getting error when to stop the named: [root@www root]# service named restart Stopping named: rndc: connect failed: connection refused [FAILED] Starting named: [ OK...
  19. santanudas

    /etc/mtab & /proc/mounts --- please help

    Hi all, I got a problem and a n urgent fix. Here is my situation one: I got /var (/dev/hda6) totally filled up so I decided to switch that one with /home (/dev/hda8) as I got plenty of spaces left over there. To do that I edited the /etc/mtab file and switched the entry for /var with /home so...
  20. santanudas

    special-purpose user account

    Hi all, I have a really tricky requirement. I need to create a special-purpose user account, by giving it a shell which only allows the ‘sftp-server’ and a set of commands, namely ‘passwd’ ‘ls’ and ‘cd’ (ls & cd within the ~user directory only). Initially, I replaced '/bin/bash' by...

Part and Inventory Search

Back
Top