![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| am a newbie to unix. plz help in understanding this code. | gokulj | UNIX for Dummies Questions & Answers | 1 | 12-23-2008 05:29 AM |
| Little Trouble Understanding some code... | NycUnxer | UNIX for Dummies Questions & Answers | 2 | 10-31-2007 09:20 AM |
| Proper routing | BOFH | IP Networking | 3 | 03-04-2007 12:36 AM |
| Where can I download the original Linux code for free? | Super Apollo | Linux | 1 | 01-25-2006 02:08 AM |
| source code download | tapanagkumar | UNIX for Dummies Questions & Answers | 1 | 07-19-2005 01:33 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Newbi - Understanding the Code and proper download
Hi,
I am new to Unix and there is code that is trying to get data from a location and save it. However it's output is messing up some date fields in the source file (ie... in source is may say 10/10/2008, the code will output 10/10/20088). This is the piece of code. Can someone help to understand what it does and how it can be fixed? Thanks in advance! #!/bin/ksh #set final file REPORT="/sas02/logistics/prom/incoming/LCL_KIT2_RPT.txt" REPSRV="lcl####.ngco.com" # using telnet through the http port 80 get the current name of the lcl promo file REPURL=`(sleep 1; echo "GET /kixprod/cgi-bin/biceps_exec_log.pl?day=0 HTTP/1.0"; echo""; sleep 1) | telnet $REPSRV 80 | sed '/GROCERY.PROMOS/!d; s/.*ngco.com//; s/">.*//'` #echo $REPURL [[ -r $REPORT ]] && rm $REPORT # using telnet through the http port 80 get the LCL_GROCERY_PROMO.txt file (sleep 1; echo "GET $REPURL HTTP/1.0"; echo "Content-type: text/plain"; echo ""; sleep 60) | telnet $REPSRV 80 | sed "/,/!d; s/<.*>//; s/\&/\&/; s/\"/\q/" > $REPORT |
|
||||
|
mpinto,
I don't see any date in the piece of code you've provided. If your saying that it is appending the code 10/10/20088. Im recommending that you analyze your script and look for a function or script pertaining to date or appending to a date. Cheers, |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|