08-29-2005
using sed to append text to the end of each line
Anyone know how to use SED to append a comma to the end of each line
example:
field1,field2,field3,field4
If i Cat /textfile ---- How can i append the end of /textfile with a comman?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to append some text @ end of the first line in a file.
like
myfile.txt
list = a,b,c
list.a=some..
I give the arg "d" . now it append at end of first line
list=a,b,c,d
list.a=some...
Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies
2. Shell Programming and Scripting
Hello to all,
On aix, I want to identify a term on a line in a file and then add a word at the end of the line identified. I do not want the word to be added when the line contains the symbol "#".
I use the following command, but it deletes the term identified then adds the word.
#sed... (4 Replies)
Discussion started by: dantares
4 Replies
3. Shell Programming and Scripting
Hi,
I've spent some time researching for this but can't seem to find a solution. I have a file like this
1234|Test|20101111|18:00|19:00There will be multiple lines in the file with the same kind of format. For every line I need to make it this
1234|Test|20101111|18:00|19:00||create... (5 Replies)
Discussion started by: giles.cardew
5 Replies
4. Shell Programming and Scripting
hi;
my file2.txt:portname=1;list=10.11;l-
portname=2;list=10.12;l-
portname=3;list=10.13;l-
...
my file1.txt:;"{'sector=%27'}"\&>
so; i want to see:portname=1;list=10.11;l-;"{'sector=%27'}"\&>
portname=2;list=10.12;l-;"{'sector=%27'}"\&>
portname=3;list=10.13;l-;"{'sector=%27'}"\&>... (4 Replies)
Discussion started by: gc_sw
4 Replies
5. Shell Programming and Scripting
I've scoured the internet with mixed results. As an amateur I turn to the great minds here.
I have a text file of 80 or so lines. I want to add ".pdf" to the end of each line. (For now that's it)
Most of the internet points toward using "sed". I don't know coding but can figure things out... (4 Replies)
Discussion started by: spacebase
4 Replies
6. Shell Programming and Scripting
After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh.
Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies
7. Shell Programming and Scripting
Hello, I'm looking for sed solution to change
...
<li>keyword</li>
<li>keyword
<li>keyword</li>
<li>keyword
<li>keyword</li>
...
to
...
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
<li>keyword</li>
...
I.e., if lines beginning with <li> do not end with... (3 Replies)
Discussion started by: pioavi
3 Replies
8. Shell Programming and Scripting
Hello,
I have to add a new line at the end of a File on Solaris-System:
I think my script should be right, because I evaluated it to other threads. However the script does not what I am expected it should do.
My file might look like this:
Line1
Line2
Line3
And my script could... (7 Replies)
Discussion started by: Timo_HR
7 Replies
9. Shell Programming and Scripting
Hi,
I have a File, which have multiple rows.
Like below
123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
I want to search a line which contains PB MO Approver and append... (2 Replies)
Discussion started by: java2006
2 Replies
10. Shell Programming and Scripting
hello Team,
I am looking for sed command or script which will append word at end of line. for example. I want to validate particular filesystem with mount |<filesystem name> command. if nodev parameter is not there then it should add in the fstab file with receptive to the filesystem.
# mount... (8 Replies)
Discussion started by: ghpradeep
8 Replies
VI(1) General Commands Manual VI(1)
NAME
vi, ki, xi - instruction simulators
SYNOPSIS
vi [ textfile ]
vi pid
ki [ textfile ]
ki pid
xi [ textfile ]
xi pid
DESCRIPTION
Vi simulates the execution of a MIPS binary in a Plan 9 environment. It has two main uses: as a debugger and as a statistics gatherer.
Programs running under vi execute about two hundred times slower than normal--but faster than single stepping under db. Ki and xi are sim-
ilar to vi but interpret SPARC and ATT3210 binaries. The following discussion refers to vi but applies to the others as well.
Vi will simulate the execution of a named textfile. It will also make a copy of an existing process with process id pid and simulate its
continuation.
As a debugger vi offers more complete information than db(1). Tracing can be performed at the level of instructions, system calls, or
function calls. Vi allows breakpoints to be triggered when specified addresses in memory are accessed. A report of instruction counts,
load delay fills and distribution is produced for each run. Vi simulates the CPU's caches and MMU to assist the optimization of compilers
and programs.
The command interface mirrors the interface to db; see db(1) for a detailed description. Data formats and addressing are compatible with
db except for disassembly: vi offers only MIPS (db -mmipsco) mnemonics for machine instructions. Ki offers both Plan 9 and Sun SPARC for-
mats.
Several extra commands allow extended tracing and printing of statistics:
$t[0ics]
The t command controls tracing. Zero cancels all tracing options.
i Enable instruction tracing
c Enable call tracing
s Enable system call tracing
$i[itsp]
The i command prints statistics accumulated by all code run in this session.
i Print instruction counts and frequency.
p Print cycle profile.
t (Vi only) Print TLB and cache statistics.
s Print memory reference, working set and size statistics.
:b[arwe]
Vi allows breakpoints to be set on any memory location. These breakpoints monitor when a location is accessed, read, written, or
equals a certain value. For equality the compared value is the count (see db(1)) supplied to the command.
SOURCE
/sys/src/cmd/vi etc.
SEE ALSO
nm(1), db(1)
BUGS
The code generated by the compilers is well supported, but some unusual instructions are unimplemented. Some Plan 9 system calls such as
rfork cause simulated traps. The floating point simulation makes assumptions about the interpreting machine's floating point support. The
floating point conversions performed by vi may cause a loss of precision.
VI(1)