hi,
Does anyone has any idea in adding few blank spaces at the end of every record in a file.
Eg:
file.txt
Baby Boy Kim 1234
Baby Boy Vik 1334
Desired output:-
output.txt
Baby Boy Kim 1234
Baby Boy Vik 1334
I want to add 10 blank spaces at the end every record in file.txt (3 Replies)
Hello All,
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
I am using a solution that was provided by a member:
awk '{s=$0;if(length(s) < 700){getline; s=s " " $0}printf("%s\n",s)}'
This scans through a file and removes '\n' within a record but not the record delimiter.
However, there are instances where there are MULTIPLE instances of '\n'... (10 Replies)
I am trying to remove a line feed (\n) within a fixed width record. I tried the tr -d ‘\n' command, but it also removes the record delimiter. Is there a way to remove the line feed without removing the record delimiter? (10 Replies)
Hey,
I'm using the command from this thread https://www.unix.com/unix-dummies-questions-answers/590-converting-list-into-line.html
to convert vertical lines to horzontal lines. But I need to remove the spaces that is created. Unfortunately I can't figure out where the space is in the code..
I... (2 Replies)
Hi,
I want to print spaces in a trailer record which is a single command.
namely the unix command which i already have
recs=`wc -l $TargetFileDir/myfile.txt|cut -c1-9`;export recs;echo 'PCPC.DXDINPT.FC0.INPUTFLE.PASS'`date +%Y%m%d``printf '%015d\n' $recs` >> $TargetFileDir/myfile1.txt
I... (3 Replies)
Hi,
I have a situation to append spaces to end of first record (header)and last record (footer) based on second record length.
The first record length is always 20.The second record will be different for different files.I have to append spaces for the first line based on second record... (2 Replies)
Hi all.
I am using /bin/sh on an HPUX system.
I have a file, with records as such:
60701006000000030380000000000000030380000400000000000
61001006000000008220000000000000008220000100000000000
61201006000000030150000000000000030150001000000000000
I know the character counts which... (5 Replies)
hey..
i had a problem with the unix command when i want to remove the white spaces in a string..i guess i cud do it with a sed command but i get an error when i give space in the square brackets..
string="nh hjh llk"
p=`echo $string | sed 's/ //g'`
i donno how to give space charater and... (2 Replies)
Hi I have an XML file. Which has spaces between different records....
current file( Has many lines, like this... I want to delete all the spaces between > and <, if there are only spaces between them)
input file
<xyzr> <abc>1234</xyzr> <aaa> <bbb> ayz mnz</bbb> <sen>KEA... (6 Replies)