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
DIETTESTTOOL(1) 														   DIETTESTTOOL(1)

NAME
DIETTestTool - Example of a tool for DIET using the LogCentral NAME
DIETTestTool - Example of a tool that connects to the LogCentral without any filter and that display all the messages published. It is used as an example for the DIET program. All received published messages are also stored in a log file. SYNOPSYS
DIETTestTool [options] ... DESCRIPTION
DIETTestTool connects to the LogCentral and get the messages (by default all, a file containing filters may be passed as an argument). The tool both display and save the messages in a log file. This log file may be given or will be created with a fix name "DIETLogTool.log". Before starting the LogCentral, you must: o launch a CORBA Naming Service. o launch log forwarders if needed o launch LogCentral service o Launch the DIETTestTool o Use a component to publish messages OPTIONS
o The first argument is the destination output file that will contain the displayed logs. o The second one is a filter to use in the tool [Remark: There is no option letter, the order is fixed] EXAMPLE
o Launching the LogCentral LogCentral -config ./LogCentral.cfg o Launching the tool DIETTestTool o Launching the tool to store the logs in the toto.log file DIETTestTool toto.log o Launching the tool to store the logs in the toto.log file with the filter in the filter.txt file DIETTestTool toto.log filter.txt RATIONALE
The LogTool uses CORBA as its communication layer. While it's a flexible and robust middleware, its deployement on heterogeneous networks still is delicate and may require using ssh tunnels. LICENSE AND COPYRIGHT
Copyright (C)2011, GRAAL, INRIA Rhone-Alpes, 46 allee d'Italie, 69364 Lyon cedex 07, France all right reserved <diet-dev@ens-lyon.fr> License This program is free software: you can redistribute it and/or mod- ify it under the terms of the GNU General Public License as pub- lished by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Pub- lic Li- cense for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. AUTHORS
GRAAL INRIA Rhone-Alpes 46 allee d'Italie 69364 Lyon cedex 07, FRANCE Email: <diet-dev@ens-lyon.fr> WWW: http://graal.ens-lyon.fr/DIET SEE ALSO
omniNames(1), logForwarder(1), LogCentral(1), testComponent(1) BUGS
AUTHOR
haikel.guemar@sysfera.com, kevin.coulomb@sysfera.com License: GPLv3 COPYRIGHT
DIET developers 0.1 2011-05-16 DIETTESTTOOL(1)
All times are GMT -4. The time now is 07:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy