Sponsored Content
Top Forums Shell Programming and Scripting Recursive FTP -- here at last. Post 302093322 by mrrippey on Wednesday 18th of October 2006 04:40:59 PM
Old 10-18-2006
when trying to use the script, I get this error:

hardfeed.ksh[74]: things: subscript out of range
WARNING: badly formatted line in directory listing for:
directory_name
attempting outside-to-inside scan

hardfeed.ksh[74]: things: subscript out of range
WARNING: badly formatted line in directory listing for:
file_name
attempting outside-to-inside scan

when I run it this way:

hardfeed -drv server username directory

Any idea what I am doing wrong?

Thanks in advance!!

Rippey
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive FTP

I am trying to write a recursive FTP script and have come to a point where I need to test if the file is either a normal ascii file or a directory. My question is how do I test if the file is either ascii or directory. (1 Reply)
Discussion started by: aslamg
1 Replies

2. UNIX for Dummies Questions & Answers

recursive effect!!

I run the following command in some of my folders... and ended up with a huge mess!! find . -type f -exec perl -e 's/blabla/zzzxxxx/gi' -p -i.bak {} \; I had to kill the process and later when I checked with one of my folders.. ls vaditerm.dt.bak vaditerm.dt.bak.bak... (2 Replies)
Discussion started by: sskb
2 Replies

3. Shell Programming and Scripting

perl + Net::FTP::Recursive

Problem: It will not advance to the next user in the list. It always dies right after it sends the 2/2 files from the first users dir. $USERLIST="/export/home/mxdooley/perl_ftp/userlist"; $USER_DIR="/export/home/mxdooley/perl_ftp/homes";... (2 Replies)
Discussion started by: Optimus_P
2 Replies

4. Shell Programming and Scripting

recursive rcp

I wrote a shell script (AIX) to extract the file "/rep1/toto" from all the hosts referred in a list and send them to one local directory named ~/$host-$file with the hostname as prefix rcp -p user@host:/rep1/$file ~/$host-$file where file = toto ==> it works ! I would do the same thing... (6 Replies)
Discussion started by: Nicol
6 Replies

5. UNIX for Advanced & Expert Users

recursive sorting

In the ls command, -t option and -R option dont work simultaneously. ls -t ---> lists the files with sorting based on file date ls -R ---> lists the files recursively. How to make utilize both in the same command.? I want to sort the recursive files listing.. (1 Reply)
Discussion started by: fermisoft
1 Replies

6. Cybersecurity

Recursive SFTP

Hello, I need to transfer files from Serve1 to Server2. Previously I was using scp command. Now I have to use sftp (due to audit issues). The problem with sftp is (atleast to my level of knowledge) we cannot transfer dirs (and files within that dir). Is there a way to solve this? Looks like... (1 Reply)
Discussion started by: MohanTJ
1 Replies

7. UNIX for Dummies Questions & Answers

recursive wc on a directory?

Hi all, I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice? thanks in advance! (13 Replies)
Discussion started by: bimba17
13 Replies

8. UNIX for Dummies Questions & Answers

Recursive Permissions???

Is there anyway that I can change permissions on a directory and all its sub-directories and files using one single "chmod" command?? (5 Replies)
Discussion started by: the_red_dove
5 Replies

9. UNIX for Dummies Questions & Answers

recursive search and ftp

Could someone help me in recursive search and ftp'ing the files to remote server? The host machine will have /dir1/dira/list_of_files1 /dir1/dirb/list_of_files2 /dir1/dirc/list_of_files3 . . . so., I need to search from dir1 recursively (only one level down) and find all the files that... (1 Reply)
Discussion started by: brahmi
1 Replies

10. OS X (Apple)

Search recursive

before posting, I have tried to find my answer elsewhere. no luck. I need to find a file buried in a folder somewhere. Master folder has 10 sub folders. each sub folder has folders too. I found this but it does nothing I am on Mac and use Applescript. do shell script "find... (2 Replies)
Discussion started by: sbrady
2 Replies
SCAN(1) 							     [nmh-1.5]								   SCAN(1)

NAME
scan - produce a one line per message scan listing SYNOPSIS
scan [+folder] [msgs] [-clear | -noclear] [-form formatfile] [-format string] [-header | -noheader] [-width columns] [-reverse | -nore- verse] [-file filename] [-version] [-help] DESCRIPTION
Scan produces a one-line-per-message listing of the specified folder or messages. Each scan line contains the message number (name), the date, the "From:" field, the "Subject" field, and, if room allows, some of the body of the message. For example: 15+ 10/05 crocker nned <<Last week I asked some of 16- 10/05 crocker message id format <<I recommend 18 10/06 brien Re: Exit status from mkdir 19 10/07*brien "scan" listing format in nmh The `+' on message 15 indicates that it is the current message. The `-' on message 16 indicates that it has been replied to, as indicated by a "Replied:" component (produced by the -annotate switch to the repl command). The `*' on message 19 indicates that no "Date:" header was present. The time of last modification of the message is given instead. If there is sufficient room left on the scan line after the subject, the line will be filled with text from the body, preceded by "<<", and terminated by ">>" if the body is sufficiently short. Scan actually reads each of the specified messages and parses them to extract the desired fields. During parsing, appropriate error messages will be produced if there are format errors in any of the messages. By default, scan will decode RFC-2047 (MIME) encoding in these scan listings. Scan will only decode these fields if your terminal can natively display the character set used in the encoding. You should set the MM_CHARSET environment variable to your native character set, if it is not US-ASCII. See the mh-profile(5) man page for details about this environment variable. The switch -reverse, makes scan list the messages in reverse order. The -file filename switch allows the user to obtain a scan listing of a maildrop file as produced by packf. This listing includes every message in the file (you can't scan individual messages). The switch -reverse is ignored with this option. The switch -width columns may be used to specify the width of the scan line. The default is to use the width of the terminal. The -header switch produces a header line prior to the scan listing. Currently, the name of the folder and the current date and time are output (see the HISTORY section for more information). If the -clear switch is used and scan's output is directed to a terminal, then scan will consult the environment variables $TERM and $TERM- CAP to determine your terminal type in order to find out how to clear the screen prior to exiting. If the -clear switch is used and scan's output is not directed to a terminal (e.g., a pipe or a file), then scan will send a formfeed prior to exiting. For example, the command: (scan -clear -header; show all -show pr -f) | lpr produces a scan listing of the current folder, followed by a formfeed, followed by a formatted listing of all messages in the folder, one per page. Omitting "-show pr -f" will cause the messages to be concatenated, separated by a one-line header and two blank lines. To override the output format used by scan, the -format string or -form file switches are used. This permits individual fields of the scan listing to be extracted with ease. The string is simply a format string and the file is simply a format file. See mh-format(5) for the details. In addition to the standard mh-format(5) escapes, scan also recognizes the following additional component escapes: Escape Returns Description body string the (compressed) first part of the body dtimenow date the current date folder string the name of the current folder If no date header is present in the message, the function escapes which operate on {date} will return values for the date of last modifica- tion of the message file itself. This feature is handy for scanning a draft folder, as message drafts usually aren't allowed to have dates in them. scan will update the nmh context prior to starting the listing, so interrupting a long scan listing preserves the new context. nmh purists hate this idea. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Alternate-Mailboxes: To determine the user's mailboxes Current-Folder: To find the default current folder SEE ALSO
inc(1), pick(1), show(1), mh-format(5) DEFAULTS
`+folder' defaults to the current folder `msgs' defaults to all `-format' defaulted as described above `-noheader' `-width' defaulted to the width of the terminal CONTEXT
If a folder is given, it will become the current folder. HISTORY
Prior to using the format string mechanism, -header used to generate a heading saying what each column in the listing was. Format strings prevent this from happening. BUGS
The argument to the -format switch must be interpreted as a single token by the shell that invokes scan. Therefore, one must usually place the argument to this switch inside quotes. The value of each component escape is set by scan to the contents of the first message header scan encounters with the corresponding compo- nent name; any following headers with the same component name are ignored. MH.6.8 11 June 2012 SCAN(1)
All times are GMT -4. The time now is 09:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy