Sponsored Content
Top Forums Shell Programming and Scripting Join 2 separate strings into one with alternate tokens. Post 302536796 by sikku on Wednesday 6th of July 2011 09:10:09 AM
Old 07-06-2011
You are using this reg exp [^:]* only twice, which means only two tokens are considered while swapping?
Is this the reason the third token does not get affected?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tokens in unix ?

im trying to remove all occurences of " OF xyz " in a file where xyz could be any word assuming xyz is the last word on the line but I won't always be. at the moment I have sed 's/OF.*//' but I want a nicer solution which could be in pseudo code sed 's/OF.* (next token)//' Is... (6 Replies)
Discussion started by: seaten
6 Replies

2. Shell Programming and Scripting

: + : more tokens expected

Hello- Trying to add two numbers in a ksh shell scripts and i get this error every time I execute stat1_ex.ksh: + : more tokens expected stat1=`cat .stat1a.tmp | cut -f2 -d" "` stat2=`cat .stat2a.tmp | cut -f2 -d" "` j=$(($stat1 + $stat2)) # < Here a the like the errors out echo $j... (3 Replies)
Discussion started by: Nomaad
3 Replies

3. UNIX for Dummies Questions & Answers

How to join two strings together

There is a file: !EN ih n w ey I want to join the current instance with its previous instance together, such as: previous_instance-B+current_instance, there "-B+" is fixed iterm, the file after operate look like: !EN start-B+!EN ih !EN-B+ih n ih-B+n w... (1 Reply)
Discussion started by: Jenny.palmy
1 Replies

4. Programming

sql,multiple join,outer join issue

example sql: select a.a1,b.b1,c.c1,d.d1,e.e1 from a left outer join b on a.x=b.x left outer join c on b.y=c.y left outer join d on d.z=a.z inner join a.t=e.t I know how single outer or inner join works in sql. But I don't really understand when there are multiple of them. can... (0 Replies)
Discussion started by: robbiezr
0 Replies

5. Shell Programming and Scripting

Replacing tokens

Hi all, I have a variable with value DateFileFormat=NAME.CODE.CON.01.#.S001.V1.D$.hent.txt I want this variable to get replaced with : var2 is a variable with string value DateFileFormat=NAME\\.CODE\\.CON\\.01\\.var2\\.S001\\.V1\\.D+\\.hent\\.txt\\.xml$ Please Help (3 Replies)
Discussion started by: abhinav192
3 Replies

6. UNIX for Dummies Questions & Answers

Join 2 files with multiple columns: awk/grep/join?

Hello, My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns: File A: (tab-delimited) PDB CHAIN Start End Fragment 1avq A 171 176 awyfan 1avq A 172 177 wyfany 1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies

7. UNIX for Dummies Questions & Answers

How to use the the join command to join multiple files by a common column

Hi, I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column). I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies

8. Programming

Reading tokens

I have a String class with a function that reads tokens using a delimiter. For example String sss = "6:8:12:16"; nfb = sss.nfields_b (':'); String tkb1 = sss.get_token_b (':'); String tkb2 = sss.get_token_b (':'); String tkb3 = sss.get_token_b (':'); String tkb4 =... (1 Reply)
Discussion started by: kristinu
1 Replies

9. Shell Programming and Scripting

Single grep to multiple strings with separate output per string

I need to grep multiple strings from a particular file. I found the use of egrep "String1|String2|String3" file.txt | wc-l Now what I'm really after is that I need to separate word count per each string found. I am trying to keep it to use the grep only 1 time. Can you guys help ? ... (9 Replies)
Discussion started by: nms
9 Replies

10. Shell Programming and Scripting

Help to join separate lines in a single one from xml file

Hi all, I need help to parse this xml file that has paragraphs broken in different lines and I would like to join in a single line. I hope you can understand my explanation. Thanks for any help/direction. The script could be in bash, awk, ruby, perl whatever please In the output I want:... (8 Replies)
Discussion started by: Ophiuchus
8 Replies
LaTeXML::Token(3pm)					User Contributed Perl Documentation				       LaTeXML::Token(3pm)

NAME
"LaTeXML::Token" - representation of a token, and "LaTeXML::Tokens", representing lists of tokens. DESCRIPTION
This module defines Tokens ("LaTeXML::Token", "LaTeXML::Tokens") that get created during tokenization and expansion. A "LaTeXML::Token" represents a TeX token which is a pair of a character or string and a category code. A "LaTeXML::Tokens" is a list of tokens (and also implements the API of a LaTeXML::Mouth so that tokens can be read from a list). Common methods The following methods apply to all objects. "@tokens = $object->unlist;" Return a list of the tokens making up this $object. "$string = $object->toString;" Return a string representing $object. Token methods The following methods are specific to "LaTeXML::Token". "$string = $token->getCSName;" Return the string or character part of the $token; for the special category codes, returns the standard string (eg. "T_BEGIN-"getCSName> returns "{"). "$string = $token->getString;" Return the string or character part of the $token. "$code = $token->getCharcode;" Return the character code of the character part of the $token, or 256 if it is a control sequence. "$code = $token->getCatcode;" Return the catcode of the $token. Tokens methods The following methods are specific to "LaTeXML::Tokens". "$tokenscopy = $tokens->clone;" Return a shallow copy of the $tokens. This is useful before reading from a "LaTeXML::Tokens". "$token = $tokens->readToken;" Returns (and remove) the next token from $tokens. This is part of the public API of LaTeXML::Mouth so that a "LaTeXML::Tokens" can serve as a LaTeXML::Mouth. AUTHOR
Bruce Miller <bruce.miller@nist.gov> COPYRIGHT
Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US. perl v5.10.1 2009-06-11 LaTeXML::Token(3pm)
All times are GMT -4. The time now is 10:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy