06-11-2012
There are only two dots in file name 1. Please re-confirm.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies
2. Shell Programming and Scripting
I want a shell script that will traverse a file system starting at specific path.
And look at all file names for repeating sequences of and remove them from the file name.
The portion of the name that gets removed has to be a repeating sequence of the same characters.
So the script would... (3 Replies)
Discussion started by: z399y
3 Replies
3. Shell Programming and Scripting
I have some files, those are abbreviated (ed,ea, and bi)
company_ed_20100719.txt
company_ea_20100719.txt
company_bi_20100719.txt
I would like to rename these files by replacing
ed with EmployeeDetails
ea with EmployeeAddress
bi with BankInfomration
as
company_... (3 Replies)
Discussion started by: LinuxLearner
3 Replies
4. UNIX for Dummies Questions & Answers
I would need a command for finding first 15000 of the file names whose 25th postion is 5 in the current directory alone.
I do have this painful command
find . -name '5*' | head -15000 | cut -c3-
please refine this.
Of course the above command also searches in the sub directories... (3 Replies)
Discussion started by: vk39221
3 Replies
5. Shell Programming and Scripting
Hi all,
I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example:
... (2 Replies)
Discussion started by: cul8er
2 Replies
6. Shell Programming and Scripting
Hi,
I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement.
There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2
(Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (1 Reply)
Discussion started by: shadow_fawkes
1 Replies
7. Shell Programming and Scripting
Hi,
I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement.
There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2
(Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (4 Replies)
Discussion started by: shadow_fawkes
4 Replies
8. Shell Programming and Scripting
Data files coming in different names in a file name called process.txt.
1. shipments_yyyymmdd.gz
2 Order_yyyymmdd.gz
3. Invoice_yyyymmdd.gz
4. globalorder_yyyymmdd.gz
The process needs to discard all the below files and only process two of the 4 file names available
... (1 Reply)
Discussion started by: dsravanam
1 Replies
9. Shell Programming and Scripting
Guys -
Need your ideas on a section of code to finish something up. To make a long story short, I'm parsing a print output file that goes to pre-printed forms. I'm intercepting it, parsing it, formatting it, cutting it up into individual pages, grabbing the text I want in zones, building an... (3 Replies)
Discussion started by: ampsys
3 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"
"Report.Dddmmyy.Thhmiss.ACCD"
"Report.Dddmmyy.Thhmiss.BCCD"
"Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
LEARN ABOUT FREEBSD
uniaddr
UNIADDR(3) BSD Library Functions Manual UNIADDR(3)
NAME
unimsg, uni_str2nsap, uni_nsap2str, uni_prefix2str, uni_e1642nsap, uni_nsap2e164 -- ATM signalling library - address handling
LIBRARY
Begemot ATM signalling library (libunimsg, -lunimsg)
SYNOPSIS
#include <netnatm/addr.h>
int
uni_str2nsap(u_char *nsap, const char *str);
void
uni_nsap2str(char *str, const u_char *nsap, int dots);
void
uni_prefix2str(char *str, const u_char *prefix, u_int len, int dots);
int
uni_e1642nsap(u_char *nsap, const char *e164);
int
uni_nsap2e164(char *e164, const u_char *nsap, int check);
DESCRIPTION
The UNI message library contains a number of utility functions to handle NSAP and E.164 addresses.
The function uni_str2nsap() parses a string and interprets it as an NSAP address. The string should consist of exact 40 hexadecimal digits
(upper and lower case are allowed) and any number of dots at any position. Any other character is illegal. The resulting NSAP address is
written to the buffer pointed to by nsap. This buffer should be at least 20 bytes. On success the funtion returns 0. If an parsing error
happens -1 is returned.
The function uni_nsap2str() converts the NSAP address pointed to by nsap into a string. For some commonly used NSAP formats (those with
leading octets 0x39, 0x45 or 0x47) dots may be inserted to make the address more readable by passing a non-0 value in dots. The buffer
pointed to by str should be large enough to hold the resulting string plus the terminating NUL. A size of 80 byte is large enough for all
cases.
The function uni_prefix2str() converts an NSAP prefix to a string. The length of the NSAP prefix in bytes is passed in len.
uni_nsap2str(str, nsap, dots) is equivalent to uni_prefix2str(str, nsap, 20, dots).
The function uni_e1642nsap() converts an E.164 address given as an ASCII string to an embedded E.164 NSAP address. The string pointed to by
e164 must consist of at least 1 and not more than 15 ASCII digits. The function returns 0 on success and -1 if the E.164 address was mal-
formed.
The function uni_nsap2e164() extracts the E.164 address from an embedded E.164 NSAP address. The argument check specifies whether the NSAP
address should be checked for correct syntax. If check is 0 the last 11 bytes of the address are ignored. If check is 1 the last 11 bytes
except the selector byte must be zero. If check is 2 the last 11 bytes must be zero. The function returns 0 on success and -1 when the NSAP
address was not an embedded E.164 NSAP or one of the additional checks failed.
SEE ALSO
libngatm(3)
AUTHORS
Hartmut Brandt <harti@FreeBSD.org>
BSD
June 14, 2005 BSD