Search Results

Search: Posts Made By: zaff
3,344
Posted By anurag.singh
use double quotes tag=$(sed -n "/${line}/...
use double quotes
tag=$(sed -n "/${line}/ s/.*\[\(.*\)].*/\1/p" myfile.txt)
14,828
Posted By Franklin52
var=$(sed -n '/0001/ s/.*\[\(.*\)].*/\1/p' file) ...
var=$(sed -n '/0001/ s/.*\[\(.*\)].*/\1/p' file)



MD5="MD5 value"

sed '/0001/ s/\[.*]/['"$MD5]"'/' file
14,828
Posted By ctsgnb
# echo "0001 zz 43242 [replace this text] name"...
# echo "0001 zz 43242 [replace this text] name" | sed '/^0001/s/\[.*\]/anything/'
0001 zz 43242 anything name


# cat input
0001 zz 43242 [replace this text] name
0002 sd 65466 [UK] country...
12,000
Posted By Corona688
Placing 'hello' in a text file would almost...
Placing 'hello' in a text file would almost certainly add a newline.

Maybe your echo doesn't support -n and is printing "-n hello". Solaris shell utilities are frequently dumb like that. Try...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy