Hi, excuse me for my poor english.
My problem is that:
I have a File
i want to add to each line of that file two strings: one at the beginning of the line, one at the ending.
string1="abcd"
string2="efgh"
i want $string1 content $string2 for each line.
Is that possible? (3 Replies)
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)
sed '1r file.txt' <source.txt >desti.txt
This example will insert 'file.txt' between line 1 and 2 of source.txt.
sed '0r file.txt' <source.txt >desti.txt
gives an error message.
Does anyone know how 'sed' can insert 'file.txt' before the first line of source.txt? (18 Replies)
How can I insert the command executed on the shell into the first line of my output file?
For example if I execute;
zcat *.gz |grep “User5501” > users.out
How can I make my users.out look like;
zcat *.gz |grep “User5501” > users.out
User5501 PA
User5501 UA
User5501 ZA... (3 Replies)
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
Hi all,
I have a file called "text.cpp" with the first line of "1"
afterwards I tried in Ubuntu to type the following
sed '12iasdasdasdasdsad' test.cpp > output.txt
however when I tried to see the result of output.txt
#cat output.txt
1
why is the line 12 is not updated to the... (6 Replies)
By using sed command, How to insert a new line before the last four lines of the file.
Old Line
Old Line
NEW LINE!
Old Line
Old Line
Old Line
Old Line (8 Replies)
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)
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)
I need to manipulate one Database file on Solaris 11 in which contains more than 5000 lines of data file path like this:
'/data1/oradata/DBNAME/system01.dbf',
'/data7/oradata/DBNAME/undotbs1_01.dbf',
'/data1/oradata/DBNAME/sysaux01.dbf',
'/data28/oradata/DBNAME/userdata01.dbf',
... (6 Replies)
Discussion started by: duke0001
6 Replies
LEARN ABOUT LINUX
shtool-mkln
SHTOOL-MKLN.TMP(1) GNU Portable Shell Tool SHTOOL-MKLN.TMP(1)NAME
shtool-mkln - GNU shtool enhanced ln(1) replacement
SYNOPSIS
shtool mkln [-t|--trace] [-f|--force] [-s|--symbolic] src-path [src-path ...] dst-path
DESCRIPTION
This is a ln(1) style command. It is enhanced to provide automatic calculation and usage of relative links with the shortest possible path,
if possible. Usually if src-path and dst-path are not absolute paths or at least they share a common prefix except the root directory
(``"/"''). When more than one src-path is specified, all of them are linked into dst-path.
OPTIONS
The following command line options are available.
-t, --trace
Enable the output of the essential shell commands which are executed.
-f, --force
Force the creation of the link even if it exists. Default is to fail with error.
-s, --symbolic
Create a symbolic link instead of a hard-link.
EXAMPLE
# shell script
shtool mkln -s foo/bar baz/quux
HISTORY
The GNU shtool fixperm command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1998 for ePerl.
SEE ALSO shtool(1), ln(1).
18-Jul-2008 shtool 2.0.8 SHTOOL-MKLN.TMP(1)