07-24-2009
Yes, with "sed" its very easy.
You have given the output you have now.
Give the output that you want it to be.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi...
i have a file with data and would like to insert a number and bracket 1) ...2)
at the beginning of every successive line; to add some formatting to the text (3 Replies)
Discussion started by: mopimp
3 Replies
2. Shell Programming and Scripting
Hi there,
may someone easily help me on this :
I want to insert a text in a specific line number like :
linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
line2insert=`expr $linenumb2start + 2`
and now I need to replace something like {} with {comment} at... (8 Replies)
Discussion started by: homefp
8 Replies
3. Shell Programming and Scripting
Dear Folks :),
I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp.
I can do this in vi editor by using this command :g/^/s//BBB_
e,g I have a file named as Test.dat and it containins below text:
michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies
4. Shell Programming and Scripting
I need to insert the output of a script into a specific line number of a txt file.
I've read the Sed man page and searched the forums and it's not immediately clear how I would go about doing this. (4 Replies)
Discussion started by: pluto7777
4 Replies
5. Shell Programming and Scripting
My input file:
Class
Number Position Range
1 Initial 50
1 Initial 50
2 Terminal 150
2 Terminal 20
2 Single 10
3 Single 20
4 Double 50
5 Initial 50
5 Initial 60
Class
Number... (11 Replies)
Discussion started by: patrick87
11 Replies
6. Shell Programming and Scripting
Hi,
I am new to unix. I need to insert a variable which contains some lines of text into a text file after fixed number of lines..
Please help me on this..
Thanks in Advance,
Amrutha (3 Replies)
Discussion started by: amr89
3 Replies
7. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
8. UNIX for Beginners Questions & Answers
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
9. Shell Programming and Scripting
i am trying to
insert text at the beginning of every even number line
with awk
i can do it with odd number lines
with this command
awk 'NR%2{$0="some text "$0}1' filehow can i edit this command
thanks (5 Replies)
Discussion started by: bob123
5 Replies
10. UNIX for Beginners Questions & Answers
Hi everyone :)
I have a file "words.txt" containing hundreds of lines of text. Each line contains a slogan.
Using the code below i am able to generate an image with the slogan text from each line.
The image filename is saved matching the last word on each line.
Example:
Line 1: We do... (2 Replies)
Discussion started by: martinsmith
2 Replies
LEARN ABOUT LINUX
sotruss
SOTRUSS(1) User Commands SOTRUSS(1)
NAME
sotruss - trace shared library calls through PLT
SYNOPSIS
sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]
DESCRIPTION
sotruss is a small wrapper around ld.so that runs the specified executable until it exits. It intercepts and produce a trace of the dynamic
library calls which are called by the executed process via the Procedure Linkage Table (PLT). It outputs the caller, the calle and the
parameters as each call is executed.
OPTIONS
-F, --from FROMLIST
Trace calls from objects on FROMLIST.
-T, --to TOLIST
Trace calls to objects on TOLIST.
-e, --exit
Also show exits from the function calls.
-f, --follow
Trace child processes as they are created by currently traced processes as a result of the fork(2) system call.
-o, --output FILENAME
Write output to FILENAME (or FILENAME. in case -f is also used) instead of standard error.
-?, --help
Give this help list
--usage
Give a short usage message
--version
Print program version
AUTHOR
Written by Ulrich Drepper.
COPYRIGHT
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
ld.so(8).
sotruss May 2014 SOTRUSS(1)