This is giving me all the columns but they all are coming in the same cell.
I am redirecting the output to a .xls file as below:
Earlier when i was using the sed command given by Don it was coming perfectly in the .xls file
only one problem i was getting there was the output was coming like below:
It was giving space before the last two letters instead of giving space before PM.
Can we edit the code given by Don? The SED command mentioned above.
Hi ,
I have a file :
CSCH74000.00
CSCH74000.00
CSCH74100.00
CSCH74000.00
CSCH74100.00
CSCH74000.00
CSCH74000.00
CSCH74100.00
CSCH74100.00
CSCH74100.00
I have to put a delimiter( say comma) in between after 6th character:
CSCH74,000.00
CSCH74,000.00
CSCH74,100.00 (2 Replies)
Hi guys!
Just was wanting to run a command that would allow me to seperate the currently logged in users.
Basically from this format:
user1
user2
user3
To:
user1|user2|user3
(Note the lack of a pipe at the end, not sure if thats possible)
Basically it needs to be in this... (11 Replies)
Im writing a KSH script to read a simple text file and add a delimiter. Ive written the following script but it runs very slow. I initially used the cut command to substring the input record then switched to this version using awk to substring... both run too slow. Any ideas how to make this more... (2 Replies)
I need some help with adding lines to file and substitute a pattern.
Ok I have a file:
#cat names.txt
name: John Doe
stationed: 1
name: Michael Sweets
stationed: 41
.
.
.
And would like to change it to:
name: John Doe
employed
permanently
stationed: 1-office (7 Replies)
Hi
Can somebody help me with solution for this PLEASE?
I have a flat file and need to insert delimiters at fixed positions in all the lines so that I can easily convert into EXCEL with columns defined as per their width.
For Example
Here is the file
{
kkjhdhal
sdfewss
sdtereetyw... (7 Replies)
Hi
Need your help to assign the string to a variable from a line which has no fixed delimter in unix.
for example , my file contains
Name="report""
File Name one="test1"
File Name two="test2"
now how do I read report , test1 and test2 ?
var1=report
var2=test1
var3=test2
... (1 Reply)
Hi,
I have a file a.txt having no delimiter.
I want to exclude the line which contains 435th character as 1 or 2 and redirect the rest of the lines to another file b.
Can you pls suggest how to do this in one liner awk.
Following is just one line of the input file a:-
120110116 ... (10 Replies)
I have a file containing data lines:
1|14|CONSTANT||11111111||00887722||30/04/2012|E|O|X||||20120528093654-30.04.2012|STA11ACT|ddts555S||||00001|rrttbbggcc|
1|15|CONSTANT||22222222||00887722||30/04/2012|E|O|X||||20120528093654-30.04.2012|rrtha772|llkis000||||00001|AAEtbbggcc|
I want to add a... (3 Replies)
Hi,
I'm new to unix, i have a variable length file like below,
01|Test|Test1|Sample|
02|AA|BB|CC|DD|
03|AAA|BBB|CCC|DDD|EEE|RRR|TTT|SSS|YYY|
I need to make this as a fixed length file. Assume that i have 10 columns in the DAT file.
for ex: the first 01 record is having 4cols -... (8 Replies)
Hi,
I am facing a typical scenario for AWK command .
In HP- UNIX is behave as expected but in red hat linux same awk code is not give the same result.
The below code is for convert the fixed width file to pipe delimiter file in HP-unix server.
awk code:
#!/bin/awk -f
NR!=1... (11 Replies)