Sponsored Content
Top Forums Shell Programming and Scripting Match and variable length string Post 302578311 by clx on Thursday 1st of December 2011 09:46:05 AM
Old 12-01-2011
Better if you show the complete part ( at least just format, actual values changed)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding out the length of a string held within a variable

:confused: Does anyone know which command I can use to find out the length of a string held within a variable? (5 Replies)
Discussion started by: dbrundrett
5 Replies

2. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies

3. Shell Programming and Scripting

Replace variable length numeric string

I have a customer who logged some cc and bank account numbers in their apache logs. I got the cc numbers x'd out with sed -e 's/args=\{16\}/args=XXXXXXXXXXXXXXXX/g' -e 's/cardnum=\{16\}/cardnum=XXXXXXXXXXXXXXXX/g'but that wasn't too difficult due to the value being 16 digits. The bank account... (7 Replies)
Discussion started by: mk4mzid
7 Replies

4. Shell Programming and Scripting

Replacing one Char in a string of variable length

Hi all, I am trying to find the best way of making a change to 1 char in a string, the string can be between 1 and 14 characters. I am reading a line in from a file which contains 012341231231:2:102939283:NNN: Require :NBN: 012838238232:3:372932:NNN: Require :NNB: I need to change 1 N or a... (8 Replies)
Discussion started by: nkwilliams
8 Replies

5. Shell Programming and Scripting

Make variable length record a fixed length

Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types: (H)eader Records (D)etail Records (T)railer Records The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Discussion started by: jclanc8
3 Replies

6. Shell Programming and Scripting

changing a variable length text to a fixed length

Hi, Can anyone help with a effective solution ? I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces. The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
7 Replies

7. Shell Programming and Scripting

Extracting substrings from a string of variable length

I have a string like Months=jan feb mar april x y .. Here the number of fields in Months is not definite I need to extract each field in the Months string and pass it to awk . Don't want to use for in since it is a loop . How can i do it (2 Replies)
Discussion started by: Nevergivup
2 Replies

8. Shell Programming and Scripting

Sed:- Supported variable replacement after string match?

Hi All, I am trying to replace the variable in the file after the particular match string. It is being replaced if i hardcode the value and with use of "&" with sed. sed -e "s/URL./& http:\\localhost:7223/g" But when am trying to pass the variable it is failing. I tried multiple... (9 Replies)
Discussion started by: sharsour
9 Replies

9. Shell Programming and Scripting

Convert variable length record to fixed length

Hi Team, I have an issue to split the file which is having special chracter(German Char) using awk command. I have a different length records in a file. I am separating the files based on the length using awk command. The command is working fine if the record is not having any... (7 Replies)
Discussion started by: Anthuvan
7 Replies

10. UNIX for Beginners Questions & Answers

Views How to replace a CRLF char from a variable length file in the middle of a string in UNIX?

My sample file is variable length, with out any field delimiters. It has min of 18 chars length and the 'CRLF' is potentially between 12-14 chars. How do I replace this with a space? I still want to keep end of record, but just want to remove these new lines chars in the middle of the data. ... (7 Replies)
Discussion started by: chandrath
7 Replies
DECLAR(3)							 GENPAT functions							 DECLAR(3)

NAME
DECLAR, GENPAT Package ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSYS
DECLAR("ident",":nb_space","format",mode,size,option); PARAMETERS
ident External connector, internal observing points or register's name. For the hierarchical descriptions, the path-name of the inter- nal observing points or registers must be specified by the syntax : instance1.instance11.name . nb_space Specify the number of blank space between each group of value associated to the connectors, signals or registers in the output file. 0,1,2,3,4,5,6,7,8,9 or nothing. format Specify the format that will be used to represent the value associated to the connectors, signals or registers. X for Hexadeci- mal, O for Octal and B for Binary. mode Specify the type of the connectors. IN for Input, OUT for Output, INOUT for Input/Output, SIGNAL for internal observing point, REGISTER for register. IN, OUT, INOUT, SIGNAL, REGISTER are constants (defines) provided by genpat. size Specify the size of the bused connectors : empty ("") for the scalar connectors, "nb1" for the numbered connectors, "nb1 TO nb2" or "(nb1 TO nb2)" (nb1 < nb2), "nb1 DOWNTO nb2" or "(nb1 DOWNTO nb2)" (nb2 < nb1) for the vectors. Where nb1 and nb2 are integer. option Specify options of the connector. "S" for a spied connector, empty ("") for a normal connector. DESCRIPTION
Describes a set of connectors, signals or registers of the same format, size and mode. EXAMPLE
DECLAR("a", ":2", "X", OUT, "3 DOWNTO 0", "S"); describes : a 3, a 2, a 1, a 0 format : Hexadecimal. mode : Output. option : Spied connector. the group is separated of the others with 2 blank spaces. result : out a(3 downto 0) X spy ;;; DECLAR ("toto", ":", "O", INOUT, "7 TO 11", ""); describes : toto 7, toto 8, toto 9, toto 10, toto 11. format : Octal. mode : Input/Output. option : none. the group is separated of the following with 0 blank space. result : inout toto(7 to 11) O ; DECLAR ("ck", ":2", "B", IN, "", ""); describes : ck. format : Binary. mode : Input. option : none. the port is separated of the following with 2 blank spaces. result : in ck ;;; DECLAR ("accu.f", ":", "B", SIGNAL, "", "S"); describes : accu.f . format : Binary. mode : Signal. option : Spied connector. the signal is separated of the following with 0 blank space. result : signal accu.f spy ; DECLAR ("accu.reg", ":1", "B", REGISTER, "(3)", ""); describes : accu.reg . format : Binary. mode : Register. option : none. the signal is separated of the following with 1 blank space. result : register accu.reg(3) ;;;; WARNING
The DECLAR function from the 4.0 release have a new parameter (option). SEE ALSO
ARRAY(3), genpat(1), pat(5) BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 DECLAR(3)
All times are GMT -4. The time now is 01:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy