10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am new to Unix. I need help in writing a code and the requirements are of as below:
1) The code is in awk code
2) Append multiple spaces to a string
Example: Address = "House_NO:1100"
I have to make sure the length of Address should be always 100, if it is less than 100, i have to... (5 Replies)
Discussion started by: Venu Gopal
5 Replies
2. Shell Programming and Scripting
Platform: Solaris 10
I have a file like below
$ cat languages.txt
Spanish
Norwegian
English
Persian
German
Portugese
Chinese
Korean
Hindi
Malayalam
Bengali
Italian
Greek
Arabic
I want to append the string " is a great language" at end of each line in this file. (3 Replies)
Discussion started by: omega3
3 Replies
3. Shell Programming and Scripting
Hello, could you please help with this one. I have an input file like this:
123,4567,89000
123456789,9876543,12
and for the output I need strings to be with the fixed length, let's say 15, and if the string is -lt 15 to be populated with blanks at the end until it reach 15, like this:
123 ,4567... (1 Reply)
Discussion started by: apenkov
1 Replies
4. UNIX for Dummies Questions & Answers
Right now, my code is:
s/Secondary Ins./Secondary Ins.\
1/g
It's adding a 1 as soon as it finds Secondary Ins.
Primary Ins.: MEDICARE B DMERC Secondary Ins.
1: CONTINENTAL LIFE INS
What I really want to achieve is having a 1 added on the next line that contain "Secondary Ins." It... (4 Replies)
Discussion started by: newbeee
4 Replies
5. AIX
i/o file:
abc,efg,xyz
Required o/p file:
"abc (Value + blank spaces=16) " ,"efg (Value +blank spaces=15) " ,"xyz (Value+ blank spaces =20) "
In short input file value stores in result file with " i/p Value " added with spaces and are of fixed size like 16,15,20
How to do using... (2 Replies)
Discussion started by: AhmedLakadkutta
2 Replies
6. Shell Programming and Scripting
Hi,
Please suggest me to write unix command, HEADER20110101 string append to first line of a file..
Regards
Akshu (3 Replies)
Discussion started by: akshu.agni
3 Replies
7. Shell Programming and Scripting
hi all , i have a requirement like this..
this just a sample script...
$ cat test.sh
#!/bin/bash
perl -e '
open(IN,"addrss");
open(out,">>addrss");
@newval;
while (<IN>)
{
@col_val=split(/:/);
if ($.==1)
{
for($i=0;$i<=$#col_val;$i++)
{
... (2 Replies)
Discussion started by: tprayush
2 Replies
8. Shell Programming and Scripting
child_amt=$amount
prev_line="$prev_line $child_amt"
i am getting the result like this
21234567890001343 000001004OLFXXX029100020091112 0000060
but i want 8 spaces between the eg:
21234567890001343 000001004OLFXXX029100020091112 0000060
how can i do this in .ksh (1 Reply)
Discussion started by: kshuser
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is.
I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
17 Replies
10. Shell Programming and Scripting
How to append constant No of spaces suppose 52 at end of each line in a file (xyz) excluding first and last line.
Please Help me out for the same. (1 Reply)
Discussion started by: deepam
1 Replies