IMHO
In my humble opinion ....
Tuesday, March 23, 2010
Prepend string in bash using sed
You can do that using the following sed command
sed 's/^/
/g'
The key here is the use of ^ Which matches the start of line.
For example below is how you can prepend "foo" to a string "bar"
echo "bar" | sed 's/^/foo-/g'
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
About Me
Syed Sibte Shah
View my complete profile
Brainbench Transcript
Favorite Articles
Function overloading in C
Blog Archive
►
2014
(2)
►
October
(1)
►
September
(1)
►
2013
(1)
►
March
(1)
►
2012
(1)
►
January
(1)
►
2011
(4)
►
August
(3)
►
January
(1)
▼
2010
(7)
►
December
(1)
►
September
(1)
►
June
(1)
►
May
(2)
►
April
(1)
▼
March
(1)
Prepend string in bash using sed
►
2009
(4)
►
November
(1)
►
March
(1)
►
February
(1)
►
January
(1)
►
2008
(5)
►
October
(1)
►
May
(4)
My Blog List
Android Developers Blog
#WeArePlay | Meet the founders changing women's lives: Women’s History Month Stories
3 days ago
Ghulam m. Babar's Blog
A Practical Guide to io_uring in Linux
3 months ago
Styling Android
Hiatus
2 years ago
The Radioactive Yak
The Cloud of Smart Things
7 years ago
Excerpts World
How to do JUnit testing with servlet filters
11 years ago