Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: OMG... simple question driving me nuts

Started 1 month, 4 weeks ago by versatileint
what you are looking for is not clear. can you please post a sample output of what you require
Site: www.daniweb.com - IT Tech Talk  www.daniweb.com - IT Tech Talk - site profile
Forum: Shell Scripting  Shell Scripting - forum profile
Total authors: 3 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: daniweb.com

Other posts in this thread:

sknake replied 1 month, 3 weeks ago
What shell are you using, and what error are you receiving? It seems to work for me: Help with Code Tags Shell Scripting Syntax ( Toggle Plain Text ) sk@svn:/tmp$ for e in ` cat file .txt`; do echo INSERT INTO \`omstest_omstest\`.\`GEN2_FIELD\` VALUES \ ( NULL, \ '$e \' , \' $e \' , \' 4 \' , \' 2009-10-05 00:00:00 \' , \' 0 \' \' 0 \' \)...

Hilliard replied 1 month, 3 weeks ago
I'm using bash... No errors... but the moment I put a $var in place of the two e's, my output gets all jumbled up... and only the last line of the file prints correctly... it is almost like it is reading a new line that is not there... or at least that I am not seeing. What shell did you use? Did you try it with more than one line in the test file?

Hilliard replied 1 month, 3 weeks ago
rofl... ha ha I'm a newb. The problem was with the text file not the commands. Should have been the first thing I checked Thanks everyone who tried to help.

sknake replied 1 month, 3 weeks ago
I'm glad you got it working Please mark this thread as solve as you have found your solution to the issue and good luck!

 

Top contributing authors

Name
Posts
Hilliard
2
user's latest post:
OMG... simple question driving...
Published (2009-11-09 18:13:53)
I'm using bash... No errors... but the moment I put a $var in place of the two e's, my output gets all jumbled up... and only the last line of the file prints correctly... it is almost like it is reading a new line that is not there... or at least that I am not seeing. What shell did you use? Did you try it with more than one line in the test file?
sknake
2
user's latest post:
OMG... simple question driving...
Published (2009-11-10 04:13:53)
I'm glad you got it working Please mark this thread as solve as you have found your solution to the issue and good luck!
versatileint
1
user's latest post:
OMG... simple question driving...
Published (2009-11-06 06:23:26)
what you are looking for is not clear. can you please post a sample output of what you require

Related threads on "www.daniweb.com - IT Tech Talk":

Related threads on other sites:

Thread profile page for "OMG... simple question driving me nuts" on http://www.daniweb.com. This report page is a snippet summary view from a single thread "OMG... simple question driving me nuts", located on the Message Board at http://www.daniweb.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity