07-18-2008
Extracting data from a string containing &;
How can I exrtact the code HU52143N200401 from a string that contains >HU52143N200401<
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
Discussion started by: mohancrr
1 Replies
2. Shell Programming and Scripting
Hi All,
How do I search first string & second string and copy all content between them from one file to another file?
Please help me..
Thanks In Advance.
Regards,
Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies
3. UNIX for Dummies Questions & Answers
Dear unix gurus,
I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this:
adam peter
blah blah blah
blah blah blah
car
01 30 200
02 31 400
03 57 121
.. .. ..
.. .. ..
n y... (8 Replies)
Discussion started by: tintin72
8 Replies
4. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies
5. Shell Programming and Scripting
Input file is on Linux box and the input file has data in just one line with 1699741696 characters.
Sample Input:
<xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Discussion started by: gaya
5 Replies
6. Shell Programming and Scripting
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies
7. Shell Programming and Scripting
Hi there, I have a bunch of vlan tagged network interfaces that are named as follows
e1000g111000
e1000g99001
e1000g3456000
nge2002
where the 'e1000g' and 'nge' parts of the name are the driver, the red and blue bits above define the VLAN and the last digit on the end defines the... (3 Replies)
Discussion started by: rethink
3 Replies
8. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
9. Shell Programming and Scripting
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Discussion started by: ckaramsetty
7 Replies
10. Shell Programming and Scripting
Hello.
First best wishes for everybody.
here is the input file ("$INPUT1") contents :
BASH_FUNC_message_begin_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_debug%%=() { local -a L_ARRAY;
BASH_FUNC_message_end_script%%=() { local -a L_ARRAY;
BASH_FUNC_message_error%%=() { local... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
base32
base32(3tcl) Base32 encoding base32(3tcl)
__________________________________________________________________________________________________________________________________________________
NAME
base32 - base32 standard encoding
SYNOPSIS
package require Tcl 8.4
package require base32::core ?0.1?
package require base32 ?0.1?
::base32::encode string
::base32::decode estring
_________________________________________________________________
DESCRIPTION
This package provides commands for encoding and decoding of strings into and out of the standard base32 encoding as specified in RFC 3548.
API
::base32::encode string
This command encodes the given string in base32 and returns the encoded string as its result. The result may be padded with the
character = to signal a partial encoding at the end of the input string.
::base32::decode estring
This commands takes the estring and decodes it under the assumption that it is a valid base32 encoded string. The result of the
decoding is returned as the result of the command.
Note that while the encoder will generate only uppercase characters this decoder accepts input in lowercase as well.
The command will always throw an error whenever encountering conditions which signal some type of bogus input, namely if
[1] the input contains characters which are not valid output of a base32 encoder,
[2] the length of the input is not a multiple of eight,
[3] padding appears not at the end of input, but in the middle,
[4] the padding has not of length six, four, three, or one characters,
CODE MAP
The code map used to convert 5-bit sequences is shown below, with the numeric id of the bit sequences to the left and the character used to
encode it to the right. It should be noted that the characters "0" and "1" are not used by the encoding. This is done as these characters
can be easily confused with "O", "o" and "l" (L).
0 A 9 J 18 S 27 3
1 B 10 K 19 T 28 4
2 C 11 L 20 U 29 5
3 D 12 M 21 V 30 6
4 E 13 N 22 W 31 7
5 F 14 O 23 X
6 G 15 P 24 Y
7 H 16 Q 25 Z
8 I 17 R 26 2
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category base32
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
base32, rfc3548
CATEGORY
Text processing
COPYRIGHT
Copyright (c) Public domain
base32 0.1 base32(3tcl)