Sponsored Content
Full Discussion: Regexpr expertise required
Top Forums Shell Programming and Scripting Regexpr expertise required Post 302365595 by steadyonabix on Tuesday 27th of October 2009 01:45:27 PM
Old 10-27-2009
Regexpr expertise required

Any experts on regular expressions out there, can you help me rationalise this?

In this post: -

https://www.unix.com/shell-programmin...-points-2.html

I use the code: -

Code:
tmp = $1 ; gsub(/00/, ".") ; $1 = tmp
        tmp = $1 ; gsub(/A[CGT]|C[GT]|GT/, "0") ; $1 = tmp
        tmp = $1 ; gsub(/AA/, "-1") ; $1 = tmp
        tmp = $1 ; gsub(/TT/, "1") ; $1 = tmp

This is because the gsub's work on the entire record but I want to exclude $1. Can anyone tell me the elegant way to do this just using the regular expression to exclude $1?

Thanks

Last edited by steadyonabix; 10-27-2009 at 02:54 PM..
 

10 More Discussions You Might Find Interesting

1. Solaris

Help required.

Hi, Iam relatively new to Shell scripting. ............ ......... Cur_log_file=`ls -lrt LOGFILE* | grep 'Jun 30' | tail -1` ............... .................. Iam trying to find some log file name to check their status, using above script line. If the log file is not avaible then rest of... (3 Replies)
Discussion started by: Lokesha
3 Replies

2. Linux

Help Required

Hi, please suggest me the possible reasons for application to get hang ???? Thanks and Regards Anand P (1 Reply)
Discussion started by: Anand Prakash
1 Replies

3. Shell Programming and Scripting

Problem with sed and negative regexpr's

I have a file with various syntax that I'm try to run sed on to change over a specific regexp and having problems. I want to swap all instances of a token so long as the token isn't followed by either an alphanumeric character, an underscore, or an exclamation point. The test file looks like... (1 Reply)
Discussion started by: ericbmn1
1 Replies

4. Solaris

x11vnc & tightvnc Expertise Required !

Hi all, For the past 3 days I have been struggling like :mad: to setup a VNC system between a solaris 8 unix host server and a windows XP tightvnc client viewer. Please bear in mind that the unix machine is crap & probably should be taken to the "Antiques Road Show on the BBC". Everything is... (2 Replies)
Discussion started by: fawqati
2 Replies

5. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

6. Shell Programming and Scripting

With expertise in the shell I want to help necessary to resolve project and wish you a happy life

Hello to all of you my friends That your friend's new in this forum and Otnmy you to help me to solve this small-scale project I would be grateful to you too The URL for the file that explains that the project os-lab-Search_projectFall2009.pdf (1 Reply)
Discussion started by: دجحخهعدج
1 Replies

7. UNIX for Dummies Questions & Answers

With expertise in the shell I want to help necessary to resolve project and wish you

Hello to all of you my friends That your friend's new in this forum and Otnmy you to help me to solve this small-scale project I would be grateful to you too The URL for the file that explains that the project (1 Reply)
Discussion started by: دجحخهعدج
1 Replies

8. Shell Programming and Scripting

Help required

Dear All, I need to script to change TTL of all zone file in my DNS and aslo i require the serial to be updated to reduce my work load. Regards Vicky (0 Replies)
Discussion started by: search4u2003
0 Replies

9. Shell Programming and Scripting

Need expertise on awk

Hi everyone. I need some help on how to fix this. I am getting positive result using the log file below and this command awk -v t="06:10:22.211" -F'|' -v main=" RBL: " -v trig="BIOS-INFO" '$2 ~ t && $7 ~ main { first = $0; getline; } first && $7 ~ trig { printf "%s\n", first; exit }' log ... (5 Replies)
Discussion started by: cwiggler
5 Replies

10. UNIX for Advanced & Expert Users

Expertise advice required <<URGENT>>

:eek:i hav a shell script in my linux server, i want to execute it everyday once automatically without using cron tabs as i dont hav permission to create one. So wht sld i do??:confused: (1 Reply)
Discussion started by: Jay Thakkar
1 Replies
DH_MOVEFILES(1) 						     Debhelper							   DH_MOVEFILES(1)

NAME
dh_movefiles - move files out of debian/tmp into subpackages SYNOPSIS
dh_movefiles [debhelperoptions] [--sourcedir=dir] [-Xitem] [file...] DESCRIPTION
dh_movefiles is a debhelper program that is responsible for moving files out of debian/tmp or some other directory and into other package build directories. This may be useful if your package has a Makefile that installs everything into debian/tmp, and you need to break that up into subpackages. Note: dh_install is a much better program, and you are recommended to use it instead of dh_movefiles. FILES
debian/package.files Lists the files to be moved into a package, separated by whitespace. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory will be moved. OPTIONS
--sourcedir=dir Instead of moving files out of debian/tmp (the default), this option makes it move files out of some other directory. Since the entire contents of the sourcedir is moved, specifying something like --sourcedir=/ is very unsafe, so to prevent mistakes, the sourcedir must be a relative filename; it cannot begin with a `/'. -Xitem, --exclude=item Exclude files that contain item anywhere in their filename from being installed. file ... Lists files to move. The filenames listed should be relative to debian/tmp/. You can also list directory names, and the whole directory will be moved. It is an error to list files here unless you use -p, -i, or -a to tell dh_movefiles which subpackage to put them in. NOTES
Note that files are always moved out of debian/tmp by default (even if you have instructed debhelper to use a compatibility level higher than one, which does not otherwise use debian/tmp for anything at all). The idea behind this is that the package that is being built can be told to install into debian/tmp, and then files can be moved by dh_movefiles from that directory. Any files or directories that remain are ignored, and get deleted by dh_clean later. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_MOVEFILES(1)
All times are GMT -4. The time now is 01:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy