Sponsored Content
Top Forums Shell Programming and Scripting Read filenames in sorted order Post 302594739 by knight_eon on Wednesday 1st of February 2012 05:19:08 AM
Old 02-01-2012
Quote:
Originally Posted by itkamaraj
i guess, -1 (numeric one) in ls command will give sorted order

Code:
ls -1 *.afp

Are you sure? This indeed will give sorted order but on Strings.
Hence,

eon.1, eon.2, eon.3, eon.10, eon.11, eon.99 etc, when passed thru ls -1, the output would be:

Code:
 
eon.1 
eon.10
eon.11
eon.2
eon.3
eon.99


So the above won't work in the current query.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Sorting filenames by order in another file

I would like to arrange /sort filenames ending with suffix like ".00XXXX". where X is a digit. However the order of arrangement is in a text file and is 'harpharzard'. e.g the text file may be like 002345 009807 001145 I wanted to avoid doing this using sql and exporting the text file back to... (4 Replies)
Discussion started by: samudimu
4 Replies

2. Shell Programming and Scripting

How to read filenames with space in between

Hi All, I need to read filenames with space in between in a for loop like Integration of utility projects Integration of hdf projects I copied these files from a windows system and as you know windows filename has spaces in between them. But while unix is reading the filename in a for... (12 Replies)
Discussion started by: dayanandra
12 Replies

3. Shell Programming and Scripting

read list of filenames from text file, archive, and remove

I posted a week ago regarding this scripting question, but I need to revisit and have a few more questions answered.. User cfajohnson was extremely helpful with the archive script, but clarification on my part is needed to help steer the answer in a direction that works in this particular... (5 Replies)
Discussion started by: fxvisions
5 Replies

4. Shell Programming and Scripting

executing code on files in the sorted order -help!

Say i have 2 files in the giving format: file1 1 2 3 4 1 2 3 4 1 2 3 4 file2 1 2 3 4 1 2 3 4 1 2 3 4 I have a PERL code (loaned by one of u -i forgot who - thanks!) that extracts the 2nd column from each file and append horizontally to a new file: perl -ane 'push @{$L->}, $F; close... (1 Reply)
Discussion started by: epi8
1 Replies

5. Shell Programming and Scripting

read line in reverse order from file

dear all i want to read 5th no of line from last line of file. kindly suggest me possible ways. rgds jaydeep (2 Replies)
Discussion started by: jaydeep_sadaria
2 Replies

6. UNIX for Dummies Questions & Answers

numerically sorted filenames

How do you sort filenames: 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 as: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: kenneth.mcbride
6 Replies

7. Shell Programming and Scripting

How to read the filenames with space character in it

Hi, My Requirement is to read the filenames which possess space charatcer in it and pass the same file name to the other shell script as input parameter. Please provide your valuable suggestion. (5 Replies)
Discussion started by: cnraja
5 Replies

8. Shell Programming and Scripting

sort the files based on timestamp and execute sorted files in order

Hi I have a requirement like below I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory My files looks like this PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies

9. Shell Programming and Scripting

Uniq code in sorted order

Hi All, A small question: I have a file check.txt which looks like below: KRPROD2,2012-11-20 08:46:50:408,ODK3325688102 KRPROD2,2012-11-20 08:47:35:289,ODK3325688102 KRPROD2,2012-11-20 08:47:35:446,ODK3325688102 KRPROD2,2012-11-20 08:48:32:973,ODK3325689120 KRPROD2,2012-11-20... (8 Replies)
Discussion started by: irfanmemon
8 Replies

10. UNIX for Beginners Questions & Answers

How to create a summary file of all files in a directory sorted in reverse alphabetical order.?

I have an interactive script which works terrific at processing a folder of unsorted files into new directories. I am wondering how I could modify my script so that( upon execution) it provides an additional labelled summary file on my desktop that lists all of the files in each directory that... (4 Replies)
Discussion started by: Braveheart
4 Replies
SOCKS_CLIENTS(1)					      General Commands Manual						  SOCKS_CLIENTS(1)

NAME
rfinger - SOCKS client version of finger rftp - SOCKS client version of ftp rtelnet - SOCKS client version of telnet rwhois - SOCKS client version of whois SYNOPSIS
See the man pages on finger(1), ftp(1), telnet(1), whois(1). DESCRIPTION
These programs provide the well-known functionalities to hosts within a firewall. Normally, when a firewall is constructed, IP-accessibil- ity across the firewall is cut off to reduce security risk to hosts within the firewall. As a result, inside hosts can no longer use many of the well-known tools directly to access the resources outside the firewall. These programs restore the convenience of the well-known tools while maintaining the security requirement. Though the programs differ very much from their counterparts in the use of the communication scheme, they should behave almost indistinguishable to the users. Note though that rftp does echo the password as you type it in if you are using anonymous as log-in name. Unlike those of the previous versions, these are "versatile" clients, meaning that they can be used for connections to inside hosts directly and to outside hosts via SOCKS proxy servers. So they can be used as replacements of their traditional counterparts. When any of these programs starts, if the environment variable SOCKS_BANNER is defined, the program prints to stderr its version number and the name or IP address of its default SOCKS proxy server. It then consults the configuration file to determine whether a request should be allowed or denied based on the requesting user, the destination host, and the requested service. For allowable requests, the configuration file also dictates whether direct or proxy connection should be used to the given destination, and optionally the actual SOCKS servers to use for the proxy connection. The program lookps first for the frozen configuration file /etc/socks.fc first. If that's not found, it then looks for the file /etc/socks.conf. If both files are absent, these programs will only try direct connections to the destination hosts, making them behaving like their regular counterparts. You can use environment variable SOCKS_NS to set the nameserver for domainname resolutions. Be sure you use the IP address of the name- server you want to use, not its domainname. If SOCKS_NS doesn't exist, the IP address defined by the symbol SOCKS_DEFAULT_NS at compile time is used if the programs were compiled with that symbol defined. Otherwise the nameservers specified in /etc/resolv.conf are used. All the client programs uses syslog with facility daemon and level notice to log their activities. These log lines usually appear in file /var/adm/messages though that can be changed by modifying /etc/syslog.conf. (See syslogd(8) and syslog.conf(5).) Typical lines look like Apr 11 10:02:23 eon rfinger[631]: connect() from don(don) to abc.com (finger) using sockd at socksserv May 10 08:39:07 eon rftp[603]: connect() directly from blue(blue) to xyz.edu (ftp) May 10 08:39:09 eon rftp[603]: bind() directly from blue(blue) for xyz.edu (ftp) May 18 13:31:19 eon rtelnet[830]: connect() from root(jon) to xyz.edu (telnet) using sockd at sockd2 May 18 14:51:19 eon rtelnet[921]: refused -- connect() from jon(jon) to xyz.edu (telnet) Of the two user-ids appearing in each log line, the first is the effective user-id when the program is invoked, the second (that within the parentheses) is the one used at login. Access control applies to the effective user-ids. SEE ALSO
finger(1), ftp(1), sockd(8), sockd.conf(5), socks.conf(5), telnet(1), whois(1) ENVIRONMENT
SOCKS_SERVER, if defined, specifies the name or IP address of the SOCKS proxy server host to use, overriding the default server compiled into the programs. SOCKS_NS, if defined, specify the IP address of the domain nameserver that should be used for name resolution, overriding both the defini- tion of symbol SOCKS_DEFAULT_NS and the file /etc/resolv.conf. ORIG_FINGER, if defined, specified the (altered) full pathname of the original finger program, which should have been renamed before installing the rfinger as the regular finger. The rfinger program invokes the original finger program to lookup information on local users. Normally this name should be compiled directly into rfinger, avoiding the need for this environment variable. Use ORIG_FINGER only if you want to override what is compiled into rfinger. AUTHOR
David Koblas, koblas@netcom.com Ying-Da Lee, ylee@syl.dl.nec.com May 6, 1996 SOCKS_CLIENTS(1)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy