11-03-2015
I don't understand your request. The red pipe char is the normal ASCII 0X7C used as a field separator in your file. Do you imply that one is an artefact? Did you try the gsub from post#1?
Last edited by RudiC; 11-04-2015 at 01:20 PM..
Reason: included "red"
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (4 Replies)
Discussion started by: mmiller99
4 Replies
2. Shell Programming and Scripting
Hi,
I want to print the lines in a file that matches particular string format using shell scripting. (4 Replies)
Discussion started by: sudhakaryadav
4 Replies
3. Shell Programming and Scripting
Hi again:
I have a log file wihch has always this format:
DATA line 1
DATA line 2
^^^^^
| Spaces or TABs
The first line always begins from the start, but the second begins with spaces or TABs,
Question:
How can I add the second line to the first one?
I mean this:
DATA... (6 Replies)
Discussion started by: iga3725
6 Replies
4. UNIX for Dummies Questions & Answers
Hello Experts,
I have a timestamp(6) column in a .csv data file , format of the data is as below:-
ETCT,P,Elec, Inc.,abc,11/5/2010 4:16:09.000000 PM,Y,Y,Y
I want the timestamp column to be properly formatted like
11/05/2010 04:16:09.000000 PM
Currently the "0" is missing with... (3 Replies)
Discussion started by: mtlrsk
3 Replies
5. Shell Programming and Scripting
Hi All,
I need read the file and out put format as below using ksh, I wrote below script its keep on repeating first line in the file.
may i know the best way to get the below out put while incrementing line in the file.
cat b.txt |awk '{print $0}' |while read line
do
aa=`cat $line |head -1... (7 Replies)
Discussion started by: ashanabey
7 Replies
6. UNIX for Dummies Questions & Answers
I have a bunch of files in various folders. I want to go through each of them and display certain lines in a particular format
All files have a similar format
Date:
Time:
User:
Message:
Miscellaneous:
(and some other stuff)I want to display to only the "Date:", "Time:" "User:" lines in... (7 Replies)
Discussion started by: newbiegal01
7 Replies
7. UNIX for Dummies Questions & Answers
First of all, please have mercy on me. I am not a noob to programming, but I am about as noob as you can get with regex. That being said, I have a problem.
I've got a string that looks something like this:
Publication - Bob M. Jones, Tony X. Stark, and Fred D. Man, \"Really Awesome Article... (1 Reply)
Discussion started by: egill
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a 100 byte length fixed width file . In that three rows are broken and went off to next line. How can I identify the broken lines?
E.g.
ABCD1234MNRD4321
abcd1234mnrd
4321
As you can see in my example my second row with small case alphabets is broken... (5 Replies)
Discussion started by: okkadu
5 Replies
9. Shell Programming and Scripting
Hi All,
I have the below scenario in my environment
Developers used to copy file from windows to Linux box. Some time on the copied file developers miss to run the dos2unix utility. Because of this script gets failed during the execution. Most of the failures are due to the dos2unix format... (7 Replies)
Discussion started by: kalpeer
7 Replies
10. Shell Programming and Scripting
Hi team,
getting output logs wrong in different format from telnet script ...
getting Output.txt
macro_outdoor_dist-6.0.0(v4_0_2) DN:1.3.903 (1101:100:11w:500:3:2:103:aa)
macro_outdoor_dist-8.1.0(v3_1_0) DN:1.3.409 (N/A)... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies
COLRM(1) BSD General Commands Manual COLRM(1)
NAME
colrm -- remove columns from a file
SYNOPSIS
colrm [start [stop]]
DESCRIPTION
The colrm utility removes selected columns from the lines of a file. A column is defined as a single character in a line. Input is read
from the standard input. Output is written to the standard output.
If only the start column is specified, columns numbered less than the start column will be written. If both start and stop columns are spec-
ified, columns numbered less than the start column or greater than the stop column will be written. Column numbering starts with one, not
zero.
Tab characters increment the column count to the next multiple of eight. Backspace characters decrement the column count by one.
ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of colrm as described in environ(7).
EXIT STATUS
The colrm utility exits 0 on success, and >0 if an error occurs.
SEE ALSO
awk(1), column(1), cut(1), paste(1)
HISTORY
The colrm command appeared in 3.0BSD.
BSD
August 4, 2004 BSD