Re: [SLUG] Script help
yep, and if I cat the file they are displayed that way I know it's a longshot, but can you confirm that there are no ^M (CR) characters in the end of each line in allusers.txt? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vino Fernando Crescini Sent: Thu, 22. September 2005 3:47 PM To: SLug Users Subject: Re: [SLUG] Script help #!/bin/bash while read name; do grep $name smbpasswd; done allusers.txt are the names in allusers.txt listed one per line? -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] FW: Script help
Hmmm, just loaded the allusers.txt file into pico and did a write out and it now works, must have still been a windows file. Now my modified procedure is below but I only get one entry in the newlist file (either the last one in allusers or the last processed if I interrupt it. #!/bin/bash while read name; do grep $name smbpasswd newlist; done allusers.txt The redirection will overwrite the file if it exists. Use to append to the file. -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] FW: Script help
Hmmm, just loaded the allusers.txt file into pico and did a write out and it now works, must have still been a windows file. Now my modified procedure is below but I only get one entry in the newlist file (either the last one in allusers or the last processed if I interrupt it. #!/bin/bash while read name; do grep $name smbpasswd newlist; done allusers.txt If you want a list of all invalid usernames in smbpasswd that is not in allusers.txt, this way might be easier: cut -d: -f1 smbpasswd | while read name; do grep -q ${name}\$ /tmp/list || echo $name done -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] FW: Script help
If you want a list of all invalid usernames in smbpasswd that is not in allusers.txt, this way might be easier: cut -d: -f1 smbpasswd | while read name; do grep -q ${name}\$ /tmp/list || echo $name done oops. that's allusers.txt instead of /tmp/list. the output of this can then be fed to smbpasswd -x -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Script help
#!/bin/bash while read name; do grep $name smbpasswd; done allusers.txt are the names in allusers.txt listed one per line? -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] BASH oddity
I have put together a bash script that does a bit of maths, but I keep getting this odd message: script.sh: line 68: 09: value too great for base (error token is 09) The specific line 68 (last below), and the immediately preceding lines, in the script read: OUR_TZ_OSET=$(date +%z) OUR_TZ_OSET_MINS=$((${OUR_TZ_OSET:3:2})) OUR_TZ_OSET_HRS=$((${OUR_TZ_OSET:1:2})) OUR_MINS=$(date +%M) OUR_HRS=$(date +%H) OUR_DATE=$(date +%d) OUR_UTC_MINS=$(($OUR_MINS-$OUR_TZ_OSET_MINS)) This problem only seems to occur with some values of $OUR_MINS which have a leading 0 (specifically 09 in this instance), when the leading digit is other than that (1 thru 5) there appears to be no problem. Any clues? I really do need to retain the leading 0 if possible when it exists. You can get date dump UTC: OUR_UTC_MINS=$(date -u +%M) -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Code Management Database
Edwin Humphries wrote: We have several Linux software products, and have recently had enquiries about customised versions for specific customers. We're happy to do it, but I'm looking for a way to manage the codebase so that when we do an upgrade, we can upgrade the customised versions without overwriting the customised code. The code is delicious mix of C, PERL, PHP and bash scripts (don't ask). My understanding is that CVS is not the tool for this job, but does anybody know of a tool that is good for this? CVS should be sufficient for this purpose with some clever use of branching and merging. -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 I think I wet my bed. --Ralph Wiggum The Brother from Another Series (Episode 4F14) Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Kernel Panic - missing file system from kernel?
if you don't want to use initrd, make sure you also compile in IDE (i.e. CONFIG_IDE, CONFIG_BLK_DEV_IDE, etc.) as well as the driver for the IDE chipset. obviously, you would need to have SCSI compiled in if that's what you're using. i hope that helps. On 14 Jun 2005 20:47 EST you wrote: I have Debian woody running with kernel 2.2.20. I am trying to build 2.4.27 and apart from a kernel build that takes a few hours, each time I try to boot it, I get a kernel panic. Googling suggests that the problem might be as I don't have initrd, that the ext2 file system support is not compiled into the kernel, but might actually becompiled as a module. The Questions is what setting do I need to change to make it so? Looking in menuconfig, under file systems, i have Second extended Fs (not extensions), Ext3, /proc and /dev/pts all in kernel. Am I missing something? Just incase it matters, the hard disk is 775MB from a lappy (1575/16/63). TIA. -- Terry Collins {:-)}}} email: terryc at woa.com.au www: http://www.woa.com.au Wombat Outdoor Adventures Bicycles, Computers, GIS, Printing, Publishing People without trees are like fish without clean water -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- Vino Fernando Crescini [EMAIL PROTECTED] http://www.cit.uws.edu.au/~jcrescin Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Script Help
Simon wrote: Hi all, Why is the following script ripping out every directory rather than just those in 'studentfile' #!/bin/bash while read name; do cd $name rm -fvr * cd .. rmdir $name done studentlist while read name; do rm -fvr $name done studentlist -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 What's a battle? --Ralph Wiggum Whacking Day (Episode 9F18) Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] how to wireless
am newbie using fc3 have down loaded prism54 driver have got so far in install says stuff about kernal tree dont know what to do help greatly appreciated if i remember correctly, fc3 comes with a 2.6.9 kernel, which should already have the prism54 driver. it is very likely that the driver is already compiled in as a module. if this is so, you can try to load the driver with: # modprobe prism54 from there you can use the wireless tools (iwconfig, etc.) or whatever gui equivalent fedora provides to configure the wireless device. -- Vino Fernando Crescini [EMAIL PROTECTED] http://www.cit.uws.edu.au/~jcrescin Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: Re: [SLUG] CHeck script
Hi all, I am moving my users home directoires from one server to another and in the process standardising usernames such that about 300 need changing. Once I hav copied over the directories (cp -a) I will then need to rename some of the directories. I have a csv file with the format oldname,newname and a script to read it: #!/bin/bash while read name1 name2; do mv $name1 $name2 # done /home/OLMC/snap/rename.txt if none of the names contain any whitespace or comma characters, you can do the following: #!/bin/bash tr ,/home/OLMC/snap/rename.txt | while read line; do mv $line done -- Vino Fernando Crescini [EMAIL PROTECTED] http://www.cit.uws.edu.au/~jcrescin Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] new laptop: bios cant see dvd/cd - so cant boot, so cant install linux.
Of course, another way is to try booting off a floppy or a USB drive. -- Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT phone: +61 2 4736 0140 University of Western Sydney email: [EMAIL PROTECTED] Locked Bag 1797 web: www.cit.uws.edu.au/~jcrescin Penrith South DC NSW 1797 My daddy shoots people! --Ralph Wiggum Last Tap Dance in Springfield (Episode BABF15) David Helstroom wrote: Hey Bevan, Have you set up the BIOS so it boots from the CD/DVD drive before the hard disk drive? There should be some option in the BIOS so that it tries to boot from the CD first, then the hard disk, etc. After you have Linux installed, you can easily change the order back, so that it speeds up the boot process. You'll have to check up on how you can access the bios on your machine, though (check the manuals). Hope that helps, Dave. On Sun, 14 Nov 2004 23:16:21 +, Broun, Bevan [EMAIL PROTECTED] wrote: Hi all I got myself a nice new laptop on the weekend. Dying to install linux on it but cant as the bios cant see the dvd/cdrom and so I cant boot ANY cd from this device. The laptop is badged pioneer but it is a mitac 8355 (athlon 64 bit, 1GB RAM). The bios is Insyde Mobile Pro Bios 4.00.05 (R1.01?). XP detects the dvd rw as teac dv-w22e. It is basically this: ttp://www.tuxmobile.org/xeron_sonic_pro_800mx.html Anybody see similar problems? Am I lookiing at a bios upgrade? Any ideas please. Thanks BB -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] ide-scsi on vanilla 2.6.9
Is there anybody using ide-scsi on a plain 2.6.9 kernel? eject -t (on /dev/sr0) doesn't seem to be working anymore. Vino Fernando Crescini Intelligent Systems Laboratory School of Computing IT University of Western Sydney Email: [EMAIL PROTECTED] Phone: 61 2 4736 0140 Web: http://www.cit.uws.edu.au/~jcrescin Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] ide-scsi on vanilla 2.6.9
On 07 Nov 2004 10:56 EST you wrote: it depends on how you've built the kernel but scsi emulation is being depreciated and you should be able to burn directly to the ide device now. for example if you use cdrecord, you no longer have to use the lun's but can call the /dev/hd* directly. regards, brett thanks. cdrecord complains loudly when used with dev=/dev/hdc: Warning: Open by 'devname' is unintentional and not supported. then again, with dev=ATA:1,0,0 i get the following: Warning: Using badly designed ATAPI via /dev/hd* interface. but despite the warnings, the latter seems to be working fine so far, even with cdrecord-prodvd. -- Vino Fernando Crescini [EMAIL PROTECTED] http://www.cit.uws.edu.au/~jcrescin Scanned by SCIT E-Mail Gateway http://www.cit.uws.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html