Sponsored Content
Full Discussion: Modifying a line
Top Forums Shell Programming and Scripting Modifying a line Post 302339497 by Franklin52 on Thursday 30th of July 2009 04:21:28 PM
Old 07-30-2009
With awk:

Code:
awk -F" |-" '/Contig/{print ">" $2;next}1' file

 

10 More Discussions You Might Find Interesting

1. IP Networking

Modifying Route

hello, I have to communicate with a distant station . But Both belong to the same area. So I do not need a gate . But when I make a traceroute, it indicates that I pass through out a gate. What can I do to establish a direct connexion between the both. (with NT ) (1 Reply)
Discussion started by: hoang
1 Replies

2. Shell Programming and Scripting

can someone help me with modifying this file

Hi, I have a file which has data kind of like this. Apr 13 08:20:38 uslis10a sendmail: m3DDKSx3006432: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKSoK006433: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKcSo006442: usliss26.ca.com Apr 13 08:20:38 uslis10c... (2 Replies)
Discussion started by: eamani_sun
2 Replies

3. Shell Programming and Scripting

Modifying file from outside

hi , I have a javascript file like this: function fnValidateId(){ var array_id = new Array("444","7888","6633","555","146562","3333","33332") var tmp_id = document.form1.id.value; var num=0; while(1) { if(tmp_id ==... (9 Replies)
Discussion started by: Sreejith_VK
9 Replies

4. Shell Programming and Scripting

modifying a awk line

Hi, I want to print specific columns (from 201 to 1001). The line that I am using is listed below. However I also want to print column 1. So column 1 and 201 to 1001. What modifcations do I need to make? Code: awk -F'\t' 'BEGIN {min = 201; max = 1001 }{for (i=min; i<=max; i++) printf... (5 Replies)
Discussion started by: phil_heath
5 Replies

5. UNIX for Dummies Questions & Answers

Modifying a particulae data in a line contained in File

Hi, I have a file containing data: systemname/userid/password/comment systemname1/userid1/password1/comment1 systemname2/userid2/password2/comment2 I want to modify the "password" using script. Can anybody help me with this problem?:confused: (2 Replies)
Discussion started by: pgarg1989
2 Replies

6. Shell Programming and Scripting

Modifying data within the same line

My file looks like this But I need to move the frequency value (Freq) to the second position, leaving intact the numbers at the top. The resulting file should look like this Thanks in advance! (3 Replies)
Discussion started by: Xterra
3 Replies

7. Shell Programming and Scripting

Help with modifying files

Hello everyone, I have some data files, with mixed header formats. the sample for the same is: >ABCD76567.x1 AGTCGATCGTAGTCGTAGCTGT >ABCD76567.y1 AGTCGATCGTAGTCGTAGCTGT >ABCD76568.x1 pair_info:898989 AGTCGATCGTAGTCGTAGCTGT >ABCD76568.y1 pair_info:893489 AGTCGATCGTAGTCGTAGCTGT... (2 Replies)
Discussion started by: ad23
2 Replies

8. Shell Programming and Scripting

Help with modifying a filename

Hello, I have a filename that looks like this: ABC_96_20141031_041133.232468 I need to shorten only the "_2014" part of the filename to simply "_14" so the filename looks like: ABC_96_141031_041133.232468 I have to do a search for this string because there are hundreds of files and... (17 Replies)
Discussion started by: bbbngowc
17 Replies

9. Shell Programming and Scripting

Modifying file from command line using Perl

Hi all, I am having a slight issue updating a file using perl from the command line I need some help with. The item is: DATA_FILE_TYPE=FULL When I run the below command /usr/bin/perl -p -i -e "s/DATA_FILE_TYPE=/DATA_FILE_TYPE=APPEND/g" processfile.cfg It looks to be... (2 Replies)
Discussion started by: kstevens67
2 Replies

10. Shell Programming and Scripting

Modifying bash script to take each line in a file and execute command

I need to modify a bash script to to take each line in a file and execute command. I currently have this: #!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies
qmail-users(5)							File Formats Manual						    qmail-users(5)

NAME
qmail-users - assign mail addresses to users OVERVIEW
The file /var/lib/qmail/users/assign assigns addresses to users. For example, =joe.shmoe:joe:503:78:/home/joe::: says that mail for joe.shmoe should be delivered to user joe, with uid 503 and gid 78, as specified by /home/joe/.qmail. Assignments fed to qmail-newu will be used by qmail-lspawn to control qmail-local's deliveries. See qmail-newu(8). A change to /var/lib/qmail/users/assign will have no effect until qmail-newu is run. STRUCTURE
/var/lib/qmail/users/assign is a series of assignments, one per line. It ends with a line containing a single dot. Lines must not contain NUL. SIMPLE ASSIGNMENTS
A simple assignment is a line of the form =local:user:uid:gid:homedir:dash:ext: Here local is an address; user, uid, and gid are the account name, uid, and gid of the user in charge of local; and messages to local will be controlled by homedir/.qmaildashext. If there are several assignments for the same local address, qmail-lspawn will use the first one. local is interpreted without regard to case. WILDCARD ASSIGNMENTS
A wildcard assignment is a line of the form +loc:user:uid:gid:homedir:dash:pre: This assignment applies to any address beginning with loc, including loc itself. It means the same as =locext:user:uid:gid:homedir:dash:preext: for every string ext. A more specific wildcard assignment overrides a less specific assignment, and a simple assignment overrides any wildcard assignment. For example: +:alias:7790:2108:/var/lib/qmail/alias:-:: +joe-:joe:507:100:/home/joe:-:: =joe:joe:507:100:/home/joe::: The address joe is handled by the third line; the address joe-direct is handled by the second line; the address bill is handled by the first line. SEE ALSO
qmail-pw2u(8), qmail-newu(8), qmail-lspawn(8) qmail-users(5)
All times are GMT -4. The time now is 06:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy