Sponsored Content
Full Discussion: Modifying a line
Top Forums Shell Programming and Scripting Modifying a line Post 302339478 by vidyadhar85 on Thursday 30th of July 2009 03:40:58 PM
Old 07-30-2009
this will do i guess..
Code:
sed 's/\(.*\)\(Contig[0-9]\)\(.*\)/\2/g' filename

 

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
DROPUSER(1)						  PostgreSQL Client Applications					       DROPUSER(1)

NAME
dropuser - remove a PostgreSQL user account SYNOPSIS
dropuser [ option... ] [ username ] DESCRIPTION
dropuser removes an existing PostgreSQL user. Only superusers and users with the CREATEROLE privilege can remove PostgreSQL users. (To remove a superuser, you must yourself be a superuser.) dropuser is a wrapper around the SQL command DROP ROLE [drop_role(7)]. There is no effective difference between dropping users via this utility and via other methods for accessing the server. OPTIONS
dropuser accepts the following command-line arguments: username Specifies the name of the PostgreSQL user to be removed. You will be prompted for a name if none is specified on the command line. -e --echo Echo the commands that dropuser generates and sends to the server. -i --interactive Prompt for confirmation before actually removing the user. dropuser also accepts the following command-line arguments for connection parameters: -h host --host host Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. -p port --port port Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. -U username --username username User name to connect as (not the user name to drop). -w --no-password Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password. -W --password Force dropuser to prompt for a password before connecting to a database. This option is never essential, since dropuser will automatically prompt for a password if the server demands password authentica- tion. However, dropuser will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. ENVIRONMENT
PGHOST PGPORT PGUSER Default connection parameters This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see in the documentation). DIAGNOSTICS
In case of difficulty, see DROP ROLE [drop_role(7)] and psql(1) for discussions of potential problems and error messages. The database server must be running at the targeted host. Also, any default connection settings and environment variables used by the libpq front-end library will apply. EXAMPLES
To remove user joe from the default database server: $ dropuser joe To remove user joe using the server on host eden, port 5000, with verification and a peek at the underlying command: $ dropuser -p 5000 -h eden -i -e joe Role "joe" will be permanently removed. Are you sure? (y/n) y DROP ROLE joe; SEE ALSO
createuser(1), DROP ROLE [drop_role(7)] Application 2010-05-14 DROPUSER(1)
All times are GMT -4. The time now is 01:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy