Sponsored Content
Top Forums Shell Programming and Scripting My script failed and can't fix it ? Post 302797841 by arm on Tuesday 23rd of April 2013 08:41:12 AM
Old 04-23-2013
output from sh -x , ftp is working but the files are not organized

Code:
+ ddir=/dest
+ sdir=/src/user/
+ [ -d /src/user/ ]
+ date
+ echo get_ftp.sh started: Tue Apr 23 15:39:33 MEST 2013
get_ftp.sh started: Tue Apr 23 15:39:33 MEST 2013
+ ftp -in 101.175.33.56
+ 0<<
user angel angel
cd /dest
lcd /src/user/
bin
mget *
bye
ENDFTP 
echo  "get_ftp.sh finished: + date
+ date
Tue Apr 23 15:39:33 MEST 2013" 
cd /usr/user
for file in * 
do      
  if [ -f  ]
  then
     dir=+ echo
+ echo

+ cut -c1-8
+ cut -c1-8

     mkdir -p 
     echo "MOVE   to "
     mv    
  fi
done
Local directory now /src/user/

Smilie

---------- Post updated at 07:41 AM ---------- Previous update was at 07:35 AM ----------

Quote:
Originally Posted by RudiC
See post #5. And: your post #13 is unreadable.

I have posted the output from sh -x , if I run the script the ftp works and get the files from remote node , but locally the part for creating directories and organizing the files into them went wrong SmilieSmilieSmilie I can't detect any error in my script as I mentioned I tested each block alone it works successfully , but whenever combine "the ftp and the for loop " in one script it fails ,

SmilieSmilieSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

fix a problem in this script

z=9 i=0 h=02 min=55 while do cat /home/barmecha/test | grep $h:$min >> /home/barmecha/file1 min=`expr $min + 1` if ; then h=`expr $h + 1` fi i=`expr $i + 1` done i have a log file with time wise log in it, this script help me to pull out logs of the give time interval...but the... (8 Replies)
Discussion started by: abhishek27
8 Replies

2. Shell Programming and Scripting

how to fix this awk script?

i have a log file while looks like this ++ user_a blabla blabla nas_b blabla user_d this is a user_a junk line another junk line user_c nas_m blabla ++ basically most of the lines contain a "user" keywords, and the rest of the lines do not have "user" at all. So I have the... (17 Replies)
Discussion started by: fedora
17 Replies

3. Shell Programming and Scripting

script for failed processes

I want to write a script that log all the failed processes and start the same process. For that I have already write a script that gives all the PID #!/bin/ksh pid= `ps -ef |grep "ov" |grep -v "grep"| awk '{print $2}'` echo $pid if ; then echo "process is running" else echo... (4 Replies)
Discussion started by: kumarabhi84
4 Replies

4. Shell Programming and Scripting

AWK script getting failed

Hi All, Below is my code , In the code below the "If" condition is getting failed. I dont know what is getting wrong here , may be i can not use may logical operator at once or something else OR brackets under If condition are to be organised . Please help!! if ($11 == "0" &&... (1 Reply)
Discussion started by: unknown123
1 Replies

5. Shell Programming and Scripting

ksh script failed while using -x

Hi, I have a Kshell script that is failed if i am using the -x option. $ cat ListOfFiles.lst \+DATA_DM01/pudwh/datafile/dw_billing_tts_1 \+DATA_DM01/pudwh/datafile/dw_billing_tts_2 ... (2 Replies)
Discussion started by: yoavbe
2 Replies

6. Windows & DOS: Issues & Discussions

Fix script error (%%n)

Hi, I'm currently tinkering with a script that uses the for command to process all *.gif files in the current folder. I marked the spot where it exits out with an error by adding a "pause" The error message given is: convert.exe: unable to open image `%x': No such file or directory @... (2 Replies)
Discussion started by: pasc
2 Replies

7. UNIX for Dummies Questions & Answers

Please help to fix awk script

Good morning, fellows. I would need to ask for your help in editing my awk script. Here is the original version: BEGIN { printf ("CRYST1 200.000 200.000 200.000 90.00 90.00 90.00 P 1 1\n") maxatoms=1000 natom=0 found_struct = 0 found_bond = 0 } { if( NF == 5 ) { foundff=0 natom++... (9 Replies)
Discussion started by: snysmumrik
9 Replies

8. Shell Programming and Scripting

How to fix my IMDB Script

Hello, I am using IMDB bot file for my movie site.. But I get this message like this---Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in... (2 Replies)
Discussion started by: lg2013
2 Replies

9. UNIX for Dummies Questions & Answers

How to fix Python path for some script/app?

Hello, i have: # python -V Python 2.7.6 But original for my CentOS is 2.3 or 2.4 my python folder: /root/python2.7.6 (inside are folders like lib, include, bin, share) I launched app iotop: # iotop -od 6 Traceback (most recent call last): File "/usr/bin/iotop", line 16, in... (3 Replies)
Discussion started by: postcd
3 Replies

10. Shell Programming and Scripting

Fix script to get missing information

Gents, Can you please help me to fix the following script in order to get complete data as desired. I am missing some data in output. the complete input file is attached. The script I am using is awk '{\ status=substr($0,91,2)\ ind=substr($0,26,1);\ ... (10 Replies)
Discussion started by: jiam912
10 Replies
thai/thwcoll.h(3)						      libthai							 thai/thwcoll.h(3)

NAME
thai/thwcoll.h - Thai wide-char string collation. SYNOPSIS
Functions int th_wcstrcoll (const thwchar_t *s1, const thwchar_t *s2) Compare two Thai wide-char strings for collation. size_t th_wcstrxfrm (thwchar_t dest[], const thwchar_t *src, size_t n) Transform wide-char string into collatable form. Detailed Description Thai wide-char string collation. Function Documentation int th_wcstrcoll (const thwchar_t *s1, const thwchar_t *s2) Compare two Thai wide-char strings for collation. Parameters: s1 : first wide-char string (null-terminated) s2 : second wide-char string (null-terminated) Returns: < 0 if s1 precedes s2; 0 if s1 equals s2; > 0 if s1 succeeds s2 size_t th_wcstrxfrm (thwchar_tdest[], const thwchar_t *src, size_tn) Transform wide-char string into collatable form. Parameters: dest : the destination wide-char string buffer src : the wide-char string to transform n : the size of dest buffer (as number of elements) Returns: the number of elements required to store the result in dest, excluding the terminating ''. If the return value >= n, dest is undefined. Transforms src into a form from which comparison using wcscmp() yields the same result as that from th_wcstrcoll(). At most n characters are put in dest. Author Generated automatically by Doxygen for libthai from the source code. Version 0.1.14 Tue Jun 17 2014 thai/thwcoll.h(3)
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy