I would appreciate if someone could help me with SED syntax for a "simple" line.
Here is where I Got to:
I have these strings that are returned by my(Examples) (naturally "FullPath" is always changing don't hardcode this lol)
FullPath/AAA.framework
FullPath/BBB.framework
FullPath/CCC.framework
FullPath/DDD.framework
That I want to convert to
FullPath/AAA.framework/Versions/5/AAA
FullPath/BBB.framework/Versions/5/BBB
FullPath/CCC.framework/Versions/5/CCC
FullPath/DDD.framework/Versions/5/DDD
So basically I want to seach for "anything" after a slash up to the dot and "extract it" to copy it to the end of the string.
I'm banging my head but here is where I got to (feel like I'm near a solution)
Any help would be really appreciated
My egrep outputs this:
$ cat html.out|sed -n '/bluetext/s/ / /gp'|egrep '{5}'
<span class="bluetext"><b> Lexington Park, MD 20653</b></span>
But my backreference \1 is empty. I dont understand why. Can someone clarify?
$ cat html.out|sed -n '/bluetext/s/ / /gp'|sed -n... (1 Reply)
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
Hello,
I'm working on learning regular expressions and what I can do with them. I'm using unix to and its programs to experiment and learn what my limitations are with them.
I'm working on duplicating the regular expression:
^(.*)(\r?\n\1)+$
This is supposed to delete duplicate lines... (2 Replies)
Hello, I want to rename multiple files and catch some points about backreference within sed and regex.
Here is a part of my file list. Input:
S92A.fa
S92B.fa
...
S96Z.fa
S921.fa
S922.fa
...
S997.fa Note: The file names are not necessarily continuous from A~Z or 921 ~ 997, as some of the... (3 Replies)
Hello everybody,
May you help with this, I don't know what is wrong.
I want trying to print the first 4 characters as decimal and remove the "k's" from the next 7 characters.
I'm trying with gsub and backrefence as shown below trying to remove the "k's" and then trying to assign to "x" the... (0 Replies)
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
Hello to all,
I have this sed script that replaces hex strins within a binary file.
As you can see, I want to replace all bytes 4X with 2X (where X could take values 0 to F).
sed -e 's/\x40/\x20/g' -e 's/\x41/\x21/g' -e 's/\x42/\x22/g' -e 's/\x43/\x23/g' -e 's/\x44/\x24/g' -e... (7 Replies)
I am learning SED and just following the shell scripting book, i have trouble understanding the grep and sed statement,
Question : 1
__________
/opt/oracle/work/antony>cat teledir.txt
jai sharma 25853670
chanchal singhvi 9831545629
anil aggarwal 9830263298
shyam saksena 23217847
lalit... (7 Replies)
I have some text like
EU1BTDAT:ASSGNDD filename='$SEQFILES/SUNIA.PJ008202.CARDLIB/DATECARD'
EU1BTDATEST:ASSGNDD filename='$SEQFILES/SUNIA.PJ008202.CARDLIB/DATECARD'
EU1CLOSEDATES:ASSGNDD filename='$SEQFILES/SUNIA.PJ008202.CARDLIB/DATECARD'
EU1DATED:ASSGNDD... (8 Replies)
Discussion started by: gotamp
8 Replies
LEARN ABOUT NETBSD
linedisc
LINEDISC(9) BSD Kernel Developer's Manual LINEDISC(9)NAME
linedisc, ttyldisc_add, ttyldisc_lookup, ttyldisc_remove -- extensible line discipline framework
SYNOPSIS
#include <sys/conf.h>
int
ttyldisc_add(struct linesw *disc, int no);
struct linesw *
ttyldisc_remove(const char *name);
struct linesw *
ttyldisc_lookup(const char *name);
DESCRIPTION
The NetBSD TTY line discipline framework allows extensibility. Modules that need special line disciplines can add them as convenient and do
not need to modify tty_conf.c. Line disciplines are now managed by a string, rather than number.
Once the framework has been initialized, a new line discipline can be added by creating and initializing a struct linesw and calling
ttyldisc_add().
The following is a brief description of each function in the framework:
ttyldisc_add() Register a line discipline. The l_name field of the struct linesw should point to a string which is to be the symbolic
name of that line discipline. For compatibility purposes, a line discipline number can be passed in no, but for new dis-
ciplines this should be set to -1.
ttyldisc_lookup() Look up a line discipline by name. NULL is returned if it can not be found.
ttyldisc_remove() Remove a line discipline called name and return a pointer to it. If the discipline cannot be found or removed
ttyldisc_remove() will return NULL.
SEE ALSO tty(4)HISTORY
The linedisc functions were added in NetBSD 1.6.
AUTHORS
The NetBSD extensible line discipline framework was created by Eduardo Horvath <eeh@NetBSD.org>.
BSD November 1, 2000 BSD