Search Results

Search: Posts Made By: Sn33R
5,314
Posted By Sn33R
Thanks for the replies mate... the funny thing...
Thanks for the replies mate... the funny thing I've just noticed is that even though I'm getting this error message when I execute the script, the data is actually being inserted into the table...
5,314
Posted By Sn33R
hmm, I get the same error message with that...
hmm, I get the same error message with that command... could it be something to do with the format of the text file?
5,314
Posted By Sn33R
Perl text file
I've got a csv file called "passlist.txt" which looks like:

firstname1,lastname1,checkin1,numberofbags1,destination1
firstname2,lastname2,checkin2,numberofbags2,destination2...
3,131
Posted By Sn33R
lol, nm... The problem wasn't with the date but...
lol, nm... The problem wasn't with the date but to do with cron not being able to find a file which the script was using. The syntax worked and the script ran successfully for the first time last...
3,131
Posted By Sn33R
OK, I think I know what's going wrong! The script...
OK, I think I know what's going wrong! The script I'm running on cron reads from a .csv file which is held in the 'scripts' directory. The script executes fine when run manually from the scripts...
3,131
Posted By Sn33R
Thanks, i'll give it a go. Thing is, all the...
Thanks, i'll give it a go. Thing is, all the existing scripts that are running on cron use '!/bin/ksh' and seem to run fine. I can't imagine why this one would be any different... :/
3,131
Posted By Sn33R
First line of script = !/bin/ksh
First line of script = !/bin/ksh
3,131
Posted By Sn33R
I use the korn shell, and there is another script...
I use the korn shell, and there is another script running on cron tha uses the same date function and calls it last on in the script successfully. The thing that puzzles me most is why the date...
3,131
Posted By Sn33R
I'll give it a go, but it seems strange that it...
I'll give it a go, but it seems strange that it interpret the date fine when the script is executed manually, but not when its run on cron. Can you think of any reason why this might be?
3,131
Posted By Sn33R
Cron problem
Hi,

Recently I wrote a shell script where I have defined LOG_DATE=$(date +"%d%b") at the start of the script (which should give the date in format '20Oct') and then called this date last on...
8,097
Posted By Sn33R
OK, avoiding the use of perl/PHP and simply...
OK, avoiding the use of perl/PHP and simply scripting using the 'bash' shell, how can I execute MySQL commands?

Example script:
#!/bin/bash
# A simple script to create a small SQL table...
8,097
Posted By Sn33R
I've only just started shelling, and don't really...
I've only just started shelling, and don't really have any experience using perl or PHP. I'm going to try and 'build' my way up to the problem, as the learning curve for a lot of the problems my boss...
8,097
Posted By Sn33R
sorry, I forgot to mention, this should be done...
sorry, I forgot to mention, this should be done automatically when a condition is met in my shell script. This needs to be hardcoded in a shell script, not by manually telnet'ing the server.
8,097
Posted By Sn33R
Editing a mySQL table on a remote machine
Hi all,

My problem: I want to connect to a remote computer (in the same office as me) which is running a mySQL server, access a specific table and update it, beofre disconnecting from the server....
3,552
Posted By Sn33R
sorry, meant to say 'Linux' - Red HAT 9.
sorry, meant to say 'Linux' - Red HAT 9.
3,552
Posted By Sn33R
I'm trying to move away from editing the file...
I'm trying to move away from editing the file manually, that's what I'm doing at the minute. I'm setting up a system for somebody else, and I want them to be able to edit the csv file held in my...
3,552
Posted By Sn33R
Updating a csv file held on a unix box with excel running on windows
Hi, my question is quite simple: Can I update a csv file which is held on a unix box (and which a script on the same box uses) with Microsoft Excel running in a windows environment? Or, is there a...
3,779
Posted By Sn33R
oh, just to clarify, i used the 'set' command to...
oh, just to clarify, i used the 'set' command to parse the line into data elements (as tony suggested) which I thought was quite cool! (i'm easily amused... :P )
3,779
Posted By Sn33R
thanks for all the replys guys, I opted for the...
thanks for all the replys guys, I opted for the 'IFS' method which was recommended by someone I work with, and which seems to be perfectly suited for processing csv files.

Thanks again for all the...
3,779
Posted By Sn33R
Getting variables out of .csv lines
I have a csv file looking like:

echo,w-cai,w-cai-ssl
echo,countrywide,countrywide-ssl
haystack,intranet3,intranet3-ssl
haystack,pnf,pnf-ssl


Basically, I want to process this file row by...
4,091
Posted By Sn33R
yeah, that's basically what I was trying to do as...
yeah, that's basically what I was trying to do as well, I even tried double dollar too ($$).

Can it be done in shell?
4,091
Posted By Sn33R
sorry, 'box' should say 'dir2', and I've found a...
sorry, 'box' should say 'dir2', and I've found a way round the problem anyway. :)

Thanks for your fast reply, only a few minutes after I posted. You guys are good! :P
4,091
Posted By Sn33R
nested looping question
Hi,

I'm having some trouble with the syntax in constructing a simple nested 'for' loop.

My code is as follows:


#!/bin/bash

dir1="fred flume haystack"
for dir2 in ${dir1}
do
...
2,890
Posted By Sn33R
Read variables from Access table
Hi!

I've just started learning shell scripting, and have been somewhat 'thrown in at the deep-end and told to swim' so excuse my complete lack of knowledge and ignorance, but here goes...

I've...
Showing results 1 to 24 of 24

 
All times are GMT -4. The time now is 08:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy