Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Can't figure out why this repeats Post 302676367 by Corona688 on Tuesday 24th of July 2012 12:56:02 PM
Old 07-24-2012
You can probably replace the line selecting 'number' with a single awk call by the way, but I'd need to see what thing.txt looks like.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search for repeats in text file - how?

I have a text file that I want to search for repeated lines and print those lines. These would be lines in the file that appear more than once. Is there a way to do this? Thanks (4 Replies)
Discussion started by: aarondesk
4 Replies

2. Shell Programming and Scripting

Cant figure out this..

Hi, I need a little help here. I am exporting user info from a PSQL database and everything is working with the exception of this: 10029008:dsAuthMethodStandard\:dsAuthClearText:classword:10029008:2004:10029008:10029008:/home/student/1002/90/08:10029008 It is putting a colon right before the... (1 Reply)
Discussion started by: Stud33
1 Replies

3. UNIX for Dummies Questions & Answers

awk repeats counter

if I wanted to know if the word DOG(followed by several random numbers) appears in col 1, how many times will that same word DOG* appeared in col 2? This is a very large file Thanks! (7 Replies)
Discussion started by: verse123
7 Replies

4. Shell Programming and Scripting

sed behaving oddly, repeats lines

Hi, all. Here's the problem: sed '/FOO/,/BAR/p' That should print anything between FOO and BAR, right? Well, let's say I have file.txt that contains just one line "how are you today?". Then I run something like the above and get: $ sed '/how/,/today/p' file.txt how are you... (9 Replies)
Discussion started by: pereyrax
9 Replies

5. Shell Programming and Scripting

Remove brackets repeats and separate in columns

Hi all, I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192) CHST3 (PA26503) docetaxel... (4 Replies)
Discussion started by: manigrover
4 Replies

6. Shell Programming and Scripting

Searching a large file for short tandem repeats

Hello, I am searching large (~25gb) DNA sequence data in fasta short read format: >ReadName ACGTACGTACGT... for short tandem repeats, meaning instances of any 2-6 character based run that are repeated in tandem a number of times given as an input variable. Seems like a reasonably simple... (3 Replies)
Discussion started by: ljk
3 Replies

7. Shell Programming and Scripting

Help with change significant figure to normal figure command

Hi, Below is my input file: Long list of significant figure 1.757E-4 7.51E-3 5.634E-5 . . . Desired output file: 0.0001757 0.00751 0.00005634 . . . (10 Replies)
Discussion started by: perl_beginner
10 Replies

8. Shell Programming and Scripting

Bash to rename files repeats previous filename in directory

In the below bash processes substitution, if there are 3 files in a directory /home/cmccabe/medex.logs/analysis.log, the filename variable is set to where these files are located. The code does execute, the problem is that if there is a renamed file in the output directory below, it gets... (0 Replies)
Discussion started by: cmccabe
0 Replies
socket_from_name(3ncs)													    socket_from_name(3ncs)

Name
       socket_from_name - convert a name and port number to a socket address

Syntax
       #include <idl/c/socket.h>

       void socket_$from_name(family, name, nlength, port, sockaddr, slength,				status)
       unsigned long family;
       socket_$string_t name;
       unsigned long nlength;
       unsigned long port;
       socket_$addr_t *sockaddr;
       unsigned long *slength;
       status_$t *status;

Arguments
       family The  integer  representation  of	an  address  family.   Value  can be socket_$internet or socket_$unspec If the family parameter is
	      socket_$unspec, then the name parameter is scanned for a prefix of family: (for example, ip:).

       name   A string in the format family:host[port], where family:, host, and [port] are all optional.  The family is an address  family.   The
	      only  valid  family  is  ip.   If  you specify a family as part of the name parameter, you must specify socket_$unspec in the family
	      parameter.  The host is a host name.  A leading number sign (#) can be used to indicate that  the  host  name  is  in  the  standard
	      numeric  form (for example, #192.9.8.7).	If host is omitted, the local host name is used.  The port is a port number.  If you spec-
	      ify a port as part of the name parameter, the port parameter is ignored.

       nlength
	      The length, in bytes, of name.

       port   A port number.  If you specify a port number in the name parameter, this parameter is ignored.

       sockaddr
	      A socket address.

       slength
	      The length, in bytes, of sockaddr.

       status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it was  success-
	      ful.

Description
       The  routine converts a textual address family, host name, and port number to a socket address.	The address family and the port number can
       be either specified as separate parameters or included in the name parameter.

Files
See Also
       intro(3ncs), socket_family_from_name(3ncs), socket_to_name(3ncs)

															    socket_from_name(3ncs)
All times are GMT -4. The time now is 10:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy