What's wrong my sed?

$ cat file1 
gcc-configure-sdk, gcc-configure-cross: Dont recomput
libgcc: Remove unpackage unwind.h
$ cat file2
fc94926 gcc-configure-sdk, gcc-configure-cross: Dont recomput
f7ec6ea libgcc: Remove unpackage unwind.h
f800988 balbababababa
$ cat ./xx.sh 
#!/bin/bash
while read line
do
    sed -n '/${line}/p' ./file2
done < ./file1

run xx.sh nothing output

Try double quotes instead of single quotes.

yes it works for this case

but If I change back to my cases

$ cat file2
29d6678fd546377459ef75cf54abeef5b969b5cf Major layout change to the packages directory
561d875404ef1783f94f37314b6e756766db8411 libc-package.bbclass: merge glibc & eglibc class files
3d7431b71b3308c917ba886d213277874c2610b0 eglibc: Set BBCLASSEXTEND to include nativesdk
9f60a6fbfb93f17a9146f93380f9a3775fe48f4d glibc-package.inc: disable build-time locale generation for nativesdk
a2116860eb4e694d81e4968c62fb9839ddca0696 eglibc: Add siteconfig cache generation
d17a09376d512496a8ff8d08cee84a829e211785 gcc-crosssdk-initial: Ensure native dependencies are built, these can differ accross different gcc versions causing build failures
75b90f1d6de833c9d0d5dcc7ebcb60fee2d26188 binutils: add binutils_poison.patch
cdbbc68d0824e979580ab9aaad48d9d01507e9a2 gcc_4.5.0: add --enable-poison-system-directories option to cross recipes
d6e8013a8c1c439eef28301b1cc3b6f7674ee63b [e]glibc-package.inc: fix providers for libsegfault and other
2e9d981d76a88ff2076f9e88c8cba8429e513505 autotools: enable siteconfig by default eglibc glibc ncurses uclibc zlib: remove explicit siteconfig
0ff070bbf1575be62691eea7b9fb3ca74f2ab373  gcc: upgrade gcc for powerpc to version 4.5.0
d8137c014f74d32dcdd2e148523640842a6ac4b1 eglibc: Add in libc_cv_slibdir setting as used by glibc to fix 64 bit builds
11a92051e714a72523a3ce4d5c627d216d076f61 poky-eglibc.inc: fix multiple providers for virtual/libc-nativesdk and other
8c33bfc84a2c8226e03a85b3eab3206db7509ef1 [e]glibc-package.inc: fix multiple providers for glibc-gconv-iso8859-1
460954b1b31981f0857f338d2fa702af9395a652 upgrade gcc to 4.5.0 for mips architecture
ce456306dad3fdf42494830011dacae213c48edf gcc: enable poison parameters detection
0f55d28a4d1f425343eb5aeae3eb7ffb3efd266a glibc & eglibc: fix mips DT_MIPS_RLD_MAP checking
dd5ad1840d164deccd9fd17eec8ec1a8486b200f eglibc: add FILESPATH to avoid failure on unpack
2a066e7ca90a28d5681c5fa895a29e999ed7c88b gcc: fix check for target libc ssp support
c09cae578e5568c0ac975124db31f9cac05d50e9 Move prism-firmware, spectrum-fw, python-urlgrabber, python-iniparse and yum-metadata to meta-extras
23f522e7a53821a8fb036e1aebddc7379d6f584e gcc: Update poisoned include path checking
4a193307092267547386a6c0801c0ccd65e88c39 binutils: Update the poison patch
ce5e891d51eac0ed2615294c7bd25eedd5650de2 Python gst package needs pygtk at runtime
df07008f56676b2fe4dd64e565303d21a6770ed6 python-pygtk: Use correct paths at build time
fafb40364dfc3951a1d62a49a412f0e15e284d03 gcc: Fix c++ search path for target system compiler making everything consistent
02445fca7b6d222c94a6bb3efd35d094025ae5fb poky-default-revisions.inc: Move SRCREV settings into this file
2e040618978b93d0add0e7e115c17545685c9dfc cross-localedef-native: tool for cross generation of locales
2f19e2a1e6fe519f77b1d9611beadbfd2c74a22a libc-package.bbclass, eglibc, glibc: enable locales generation using cross-localedef
fa647b91768a151988f57036dfeff9a0846d6f61 recipes-core: Cleanup package descriptions and summaries
b5f744c5d6fea4e5f33545d1dbf40d2f964cb786 python: fix for host contamination issue while cross compiling
462aef73fad5f01afa89fe76da57032fc5abceee eglibc-nativesdk: Add patch to change the search path of the dynamic linker
8238ee666ed09cef1aa5a6b34867fea90abb687e python: Remove hardcoded python references and replace with PN, allowing use of BBCLASSEXTEND=nativesdk
6ac1365aa58e0169a17b250272121088ed3aa47b eglibc: fix build of eglibc-initial for make 3.82
25c00dae8ed1a10e5e3c888b064819c9a8dee6fa python: Fix hardcoded python references which should refer to PN, removing duplicate providers warning
ff2448a6c43be5cec55fe54590d38dd6616f3818 ld.so.conf: create empty file
5ea93132cebf952f3fa818f4b814a994031dcfb0 eglibc: install the missing /etc/ld.so.conf into target
ffce440e9743991bfcbea2b3b860a1dc85af7821 eglibc: add en-us locale generation
a7af5c516e547e669d92569dba21a9c1c790cf7f python-gst: upgrade from 0.10.18 to 0.10.19
793bb465b3a6b0c883340621575b9944d7ccaf5a python, python-native upgrade from 2.6.5 to 2.6.6
c02fae66755b73dc5e8cccdb0225646697490f44 eglibc: update svn checkout commit
771d890d086534536ff4aa4a386f17e2b697c0be eglibc: rebase a nativesdk patch to the newer code
32f05375659ab6522b9242d0204e26560f7321da python-gst: Fix the configure patch & add LIC_FILE_CHKSUM
b1dd356f5eab11fa6fc18013189e51c13fdd763b gcc: upgrade from 4.5.0 to 4.5.1
563953df47785bf57969d86b9b5f8494e585a28c libtool upgrade from 2.2.10 to 2.4
97f78fef280007b3ffb415485dde7d18655102d1 gcc:Add license checksum and update the GPL information
75f93fe26e349a1cbfcd4156b2d431703f53fcfa python:Add license checksum to bb file
6b306bcabc711c5a7d9714300e8b291cef145bfb python-dbus:Add license checksum to bb file
373e5c2a8163445bf183ffbbbf3a38c4d8bda1aa python-imaging:Add license checksum to bb file
d5e9c266b25a12c8571bd11a26132468f3fd92ce python-pygobject:Add license checksum and update the GPL information
f48c8d856379690bdd325d568eb37b060ae52ef9 python-pygtk:Add license checksum and update the GPL information
5d378ef3c88ca700d4971d4e60924127ebc05da1 python-pyrex:Add license checksum and update the License information
d5132c5f359d5dcf608c71a7360e7ea8ac86715b python-scons:Add license checksum and update the GPL information
3d08b9f2c65835822b1c0ed30e3170f02f877ce3 SRC_URI Checksums Additionals
322d6ab29902a51bd46303a4aed9f2b0b63cdb44 cross-canadian: pkg name includes target arch
2021e2a74f4a8cb2066279e3006087fd3b198bc9 Using TRANSLATED_TARGET_ARCH instead of TARGET_ARCH.
8bcb64c0737e2322031a5579c1a3fa01d944b348 recipes-devtools: Add Summary information
d436d3bf491cf18c24ec834010210594798cf450 eglibc: organize the recipes lic and other meta data in common file
d476a237ef9ac06e3214a2f6e8d2c8be05b3d830 gcc_4.5.1: Move the license related information in the right file
3df335abd834b96d8940fb88041cb3fb7f34ac95 python-pygobject: upgrade from 2.21.1 to 2.27.0
0077ae62e98a949969d6f4f0f0e74327285b36c7 python-pygobject: Fix SRC_URI checksums
7b93c57fa399999aa57976c59108e279f0910ef1 python-pygobject: add --disable-introspection
4b53a2ee5dff8ebd321080c1147ba12b223c3933 python-pygobject: remove older install of generate-constants and add BBCLASSEXTEND
4df34661bd8fa075921e3fa77c6a2cd1ee412d5a python: Add LIC_FILES_CHKSUM
21bc438c781004d4a0daf17c15af5bebc1ad272c cross-localedef: add LIC_FILES_CHKCSUM
6dca14314accf35b22e178a1c26fe5d86e57a111 eglibc: Only package ld.so.conf, not /etc/rpc which then conflicts with netbase
674f99954091856a67c532d17248df6c59b9394d binutils: delete unused patches
b3a195d1e85feeccb3c9c448bbd0384c9cac4fb8 binutils*.inc: Recipe format cleanup
0e8f0f0a033c79611a15914fde5826876502af2e RDEPENDS, RRECOMMENDS -> RDPEPENDS_${PN}, RRECOMMENDS_${PN}
58507838bbd1b83aff380c5cc5de1df9d532bf2e python-pygobject: Fix DEPENDS and RDEPENDS for native recipe
f13cb20ed19c41b9ff85ef1c9ec0883a21d1d5bf gcc-4.5.1: make c++ include path relative to "--sysroot"
73cc14980c5770d98473eadb0a4a986d2830f675 binutils: use default ${CC} instead of defining it own
b91c0f435bb7af58ccf31678ffebc890908d37cd python-dbus: upgrade from 0.83.1 to 0.83.2
0df3c481309e89b93e8a57773eb9c470b4dd13a7 libgcc: use the new recipe (rather than gcc-runtime) to install libgcc_s.so* and crt*.o
e261c1760d8a660c13cd00039a4812d51f47f3df python: Fix failures of LSB python-runtime tests.
95fc6ae1649c86b5c2686385772cda35f5e7631f gcc_4.5.1: add DSO linking change patch
60ee8b569c8c5acc2e19f00b1b8f4494957f3268 eglibc-package.inc: Stop eglibc-nativesdk providing eglib-thread-db and locale-base-*
c15f20a124cdc4966014ff624a06ab5a325042cd binutils: upgrade to 2.21 and add libtool sysroot support
ce175a948e296c7c5fe6249723e799db47e97932 binutils: forward-port the binutils-poison.patch
68a9d3dd5a40dd1a3d664e4a99cc9da18686f2e1 binutils: Fix QA staging errors for target binutils
4d387c3c0e8807013af61c964536c68f8e976762 binutils: fix library RPATHs
bc9d2fbfd4eaad0df5647dd5d07dfb9fcff80ff3 staging: Use relative path in sysroot-destdir for target recipes
34729e4f828f2c9efc415838098d4e5dedd456ee gcc-cross-initial, gcc-crosssdk-initial: change CROSS_TARGET_SYS_DIR and insall into new locations
23cb814b2761cbe42f1f76e66abb61d8d4584c54 gcc-cross-intermediate, gcc-crosssdk-intermediate: change CROSS_TARGET_SYS_DIR and install into new locations
c0e1272d1526484f1921f3dd14ca042798d530d9 gcc/libc: Change bootstrap to use an intermediate sysroot and hence no longer overwrite files
82745e4f32e83a49e2fbb825ace8d3452c37b4d4 cross.bbclass: Move sysroot_stage_all function to the only place that uses it now (gcc-cross-intermediate)
21f2dae46b481dbf34f6874ae814dcd23fc86d54 libgcc: Explicitly wait for the libc packaging to occur before libgcc packages
1d3face8f2cd84ce987f59e8c869bb076cd0869c cross-localedef-native: Fix do_move_ports since the definition of  changes. Raises the question of whether we even need ports for this?
3150c5a0c210da6bce9ccd3d1a110a4d7058166d binutils-cross-canadian.inc: disable -werror like -cross does
96aeec41bcc1f34f124dc8d8326ccacfc145106e meta: Update mirror urls to new format and update yocto project urls
be9262233975911e404f6fcdb3c81ba916d28e32 Remove all comments from multiline expressions (as mentioned in bug #704)
553a92c442bc3a35d1520a22e640a3a0e377b8f7 gcc: take out libiberty files from gcc packages
4bb281ef5f12096d0889ba8efcc3fd3bb0ed3b3c gcc-runtime: fix LSB library checks for libstdc++.so.6
94b36524550ff2c94a5f8d82a9bc2073c06d418a python: add generate-manifest-2.6.py script and regen python-2.6-manifest.inc
547c62361b21d9cae281d58c54ec2d19a5e25306 gcc-configure-runtime.inc: Add immediate evaluation otherwise it ends in circular dependency
724137e50762f190438e8e87d3f0f9edd99ea11d gcc-runtime: Ensure that gcc-runtime builds a debug package
868f8d3dd04e3c6dbbce154742cf877fda460a3e gcc/collect2: Added --sysroot support into collect2 in gcc.
285fbd8a206eee061e27f37430499fcbe1e7284d gcc-runtime: Fix dbg files
0499bacc30274f2300fb956362bda8a53fdc625e Various: Switch to GNOME_MIRROR
e0eeb10144db74c0671acd684059e8a6f82a572f gcc-runtime_4.5.1.bb: Fix ICE in gcc-runtime with -feliminate-dwarf2-dups
3aa429406184d27bdb8a771c4c12bde1dcccb95b recipes: Use -uclibceabi instead of -uclibcgnueabi
29f6d0f1f28fef1ee6097d327c08828f032c0b9e binutils: Use arm*-*-linux-uclibceabi instead of arm*-*-linux-uclibcgnueabi
$file1
Major layout change to the packages directory
libc-package.bbclass: merge glibc & eglibc class files
eglibc: Set BBCLASSEXTEND to include nativesdk
glibc-package.inc: disable build-time locale generation for nativesdk
eglibc: Add siteconfig cache generation
gcc-crosssdk-initial: Ensure native dependencies are built, these can differ accross different gcc versions causing build failures
binutils: add binutils_poison.patch
gcc_4.5.0: add --enable-poison-system-directories option to cross recipes
[e]glibc-package.inc: fix providers for libsegfault and other
autotools: enable siteconfig by default eglibc glibc ncurses uclibc zlib: remove explicit siteconfig
 gcc: upgrade gcc for powerpc to version 4.5.0
eglibc: Add in libc_cv_slibdir setting as used by glibc to fix 64 bit builds
poky-eglibc.inc: fix multiple providers for virtual/libc-nativesdk and other
[e]glibc-package.inc: fix multiple providers for glibc-gconv-iso8859-1
upgrade gcc to 4.5.0 for mips architecture
gcc: enable poison parameters detection
glibc & eglibc: fix mips DT_MIPS_RLD_MAP checking
eglibc: add FILESPATH to avoid failure on unpack
gcc: fix check for target libc ssp support
Move prism-firmware, spectrum-fw, python-urlgrabber, python-iniparse and yum-metadata to meta-extras
gcc: Update poisoned include path checking
binutils: Update the poison patch
Python gst package needs pygtk at runtime
python-pygtk: Use correct paths at build time
gcc: Fix c++ search path for target system compiler making everything consistent
poky-default-revisions.inc: Move SRCREV settings into this file
cross-localedef-native: tool for cross generation of locales
libc-package.bbclass, eglibc, glibc: enable locales generation using cross-localedef
recipes-core: Cleanup package descriptions and summaries
python: fix for host contamination issue while cross compiling
eglibc-nativesdk: Add patch to change the search path of the dynamic linker
python: Remove hardcoded python references and replace with PN, allowing use of BBCLASSEXTEND=nativesdk
eglibc: fix build of eglibc-initial for make 3.82
python: Fix hardcoded python references which should refer to PN, removing duplicate providers warning
ld.so.conf: create empty file
eglibc: install the missing /etc/ld.so.conf into target
eglibc: add en-us locale generation
python-gst: upgrade from 0.10.18 to 0.10.19
python, python-native upgrade from 2.6.5 to 2.6.6
eglibc: update svn checkout commit
eglibc: rebase a nativesdk patch to the newer code
python-gst: Fix the configure patch & add LIC_FILE_CHKSUM
gcc: upgrade from 4.5.0 to 4.5.1
libtool upgrade from 2.2.10 to 2.4
gcc:Add license checksum and update the GPL information
python:Add license checksum to bb file
python-dbus:Add license checksum to bb file
python-imaging:Add license checksum to bb file
python-pygobject:Add license checksum and update the GPL information
python-pygtk:Add license checksum and update the GPL information
python-pyrex:Add license checksum and update the License information
python-scons:Add license checksum and update the GPL information
SRC_URI Checksums Additionals
cross-canadian: pkg name includes target arch
Using TRANSLATED_TARGET_ARCH instead of TARGET_ARCH.
recipes-devtools: Add Summary information
eglibc: organize the recipes lic and other meta data in common file
gcc_4.5.1: Move the license related information in the right file
python-pygobject: upgrade from 2.21.1 to 2.27.0
python-pygobject: Fix SRC_URI checksums
python-pygobject: add --disable-introspection
python-pygobject: remove older install of generate-constants and add BBCLASSEXTEND
python: Add LIC_FILES_CHKSUM
cross-localedef: add LIC_FILES_CHKCSUM
eglibc: Only package ld.so.conf, not /etc/rpc which then conflicts with netbase
binutils: delete unused patches
binutils*.inc: Recipe format cleanup
RDEPENDS, RRECOMMENDS -> RDPEPENDS_${PN}, RRECOMMENDS_${PN}
python-pygobject: Fix DEPENDS and RDEPENDS for native recipe
gcc-4.5.1: make c++ include path relative to "--sysroot"
binutils: use default ${CC} instead of defining it own
python-dbus: upgrade from 0.83.1 to 0.83.2
libgcc: use the new recipe (rather than gcc-runtime) to install libgcc_s.so* and crt*.o
python: Fix failures of LSB python-runtime tests.
gcc_4.5.1: add DSO linking change patch
eglibc-package.inc: Stop eglibc-nativesdk providing eglib-thread-db and locale-base-*
binutils: upgrade to 2.21 and add libtool sysroot support
binutils: forward-port the binutils-poison.patch
binutils: Fix QA staging errors for target binutils
binutils: fix library RPATHs
staging: Use relative path in sysroot-destdir for target recipes
gcc-cross-initial, gcc-crosssdk-initial: change CROSS_TARGET_SYS_DIR and insall into new locations
gcc-cross-intermediate, gcc-crosssdk-intermediate: change CROSS_TARGET_SYS_DIR and install into new locations
gcc/libc: Change bootstrap to use an intermediate sysroot and hence no longer overwrite files
cross.bbclass: Move sysroot_stage_all function to the only place that uses it now (gcc-cross-intermediate)
libgcc: Explicitly wait for the libc packaging to occur before libgcc packages
cross-localedef-native: Fix do_move_ports since the definition of  changes. Raises the question of whether we even need ports for this?
binutils-cross-canadian.inc: disable -werror like -cross does
meta: Update mirror urls to new format and update yocto project urls
Remove all comments from multiline expressions (as mentioned in bug #704)
gcc: take out libiberty files from gcc packages
gcc-runtime: fix LSB library checks for libstdc++.so.6
python: add generate-manifest-2.6.py script and regen python-2.6-manifest.inc
gcc-configure-runtime.inc: Add immediate evaluation otherwise it ends in circular dependency
gcc-runtime: Ensure that gcc-runtime builds a debug package
gcc/collect2: Added --sysroot support into collect2 in gcc.
gcc-runtime: Fix dbg files
Various: Switch to GNOME_MIRROR
gcc-runtime_4.5.1.bb: Fix ICE in gcc-runtime with -feliminate-dwarf2-dups
recipes: Use -uclibceabi instead of -uclibcgnueabi
binutils: Use arm*-*-linux-uclibceabi instead of arm*-*-linux-uclibcgnueabi
gcc-runtime_4.5.1.bb: Do not filter out -feliminate-dwarf2-dups
python-native: add missing SRC_URI hashes
ldconfig-native-2.12.1: newer recipe with eglibc sources
eglibc-package.inc: Add eglibc-binaries, eglibc-localedatas, eglibc-gconvs and eglibc-charmps to variable PACKAGE
gcc: Add "--enable-clocale=gnu" option for LSB.
Rename poky-lsb override to linuxstdbase
python-gst: upgrade from 0.10.19 to 0.10.21
python-pycairo: fix installation path of __init__.py
gcc: Add recipes for 4.6.0
python: add missing cytpes modules
logging: update existing oe* logging users to the bb* interface
python: Unbreak Python third-party extensions
poky-default-revisions: move the SRCREV to recipe file
gcc-4.6.0: Add missing recipes for gcc-cross-canadian and gcc-crosssdk
gcc-4.6.0: Backport FSF 4.6 branch patches
eglibc-2.13: Add recipes for eglibc 2.13
python-imaging: update upstream status for patches
gcc-4.5.1: update upstream status of patches
binutils: update upstream status of patches
gcc-package-target: Switch to TARGET_PREFIX in symlinks
binutils.inc: Switch to TARGET_PREFIX not TARGET_SYS
bitbake.conf: Include the new default-providers.inc and default-versions.inc files
distro: Add defaultsetup.conf, a set of default configuration providing sane overrridable default for commonly used options
siteinfo.bbclass: Add powerpc-linux-gnuspe.
python-native: Add ctypes patch to native build (as in cross-compilation)
tcmode-default: Fix defaults for libgcc recipes
recipes: Fix the Upstream-Status format
tcmode-default: lock also versions for eglibc
recipes: Add Upstream-Status to multiple recipes
gcc: fix target gcc runtime issue
gcc 4.5.1 4.6.0: remove unused patches
recipes: Update upstream-status of patches
tcmode-default: fix a typo
eglibc: backport fix from oe master to stop libc.so leaking into ${PN}
gcc: Move 4.3.3 and Special kernel 3.4.4 to meta-extras
gcc: remove unused patches and move patches in proper dir
tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm
tcmode-default: switch to eglibc 2.13 from 2.12
tcmode-default: switch to gcc 4.6.0 for ppc & mips also
python-pygpbject: upgrade from 2.27 to 2.27.91
eglibc.inc: Transfer PARALLEL_MAKE to PARALLELMFLAGS
python-2.6.6: py_package_preprocess should change Makefile only in PKGD not D
binutils: Add missing dependency on zlib-native
tcmode-default: workaround for gcc 4.6.0 failure on beagleboard
License Field Cleanup: Non-standard field names
gcc-cross-csl-2008q1: Drop last remaining fail-fast override use and make it unconditional
gcc: Fix volatile access issue for ARM
recipes: Upstream-status --> Upstream-Status: for multiple patches
eglibc: fix mispackaging of libcidn
gcc-package-cross: also install the symlinks in libexec with target prefix
gcc: rebase the patch to avoid patch rejection
Revert "gcc: rebase the patch to avoid patch rejection"
tcmode-default: fix PREFERRED_VERSION_gcc-cross-canadian
eglibc 2.12/2.13: Upgrade SRCREV
eglibc: migrate configurability from oe
gcc-4.6.0: Bring in patches from FSF 4.6 branch
eglibc_2.12.bb: Remove already upstreamed fix-for-make-3.82.diff
eglibc: bump PR for SRCREV changes
binutils_2.21.bb: Fix ld segfault exposed by eglibc 2.14 on x86_64
eglibc-package.inc: Package newly added sotruss and supporting libraries
eglibc: Upgrade recipes from 2.13 -> 2.14
tcmode-default.inc: Bump EGLIBCVERSION to 2.14
Revert "tcmode-default.inc: Bump EGLIBCVERSION to 2.14"
Revert "eglibc: Upgrade recipes from 2.13 -> 2.14"
gcc-4.6: Switch to using svn SRC_URI for recipe
tcmode-default.inc: use 4.6 for GCCVERSION and SDKGCCVERSION
python-gst: Add missing files to the -dbg package
python-pyobject: Remove unnecessary -dbg setting
python: Switch to using the default -dbg package
python: Add python to the dependency to pygobject
common-licenses: Additions and corrections
libc-locale: split locale handling from libc recipe.
eglibc: Fix version 2.12 after locale changes
glibc/eglibc: Add missing PR bump
gcc: Fix file ownership
gcc-cross-kernel: update to match new toolchain sysroot layout
libc-locale: Drop PN-locale packages
libc-locale: Fixup various packaging warnings
glibc/eglibc: Clean up package warnings and potentially broken data in -dev package
libc locale split: fix some remaining problems
ofono: upgrade to version 0.50
eglibc-package.bbclass: Fix unintended code changes
eglibc-package.bbclass: Ensure localedef is only packaged in one location
glibc-2.12: Add missing PR bump
Share gcc work directories
gcc-4.5.1: share work directories
gcc-4.6: share work directories
binutils: allow distro to select gold as default linker
python: Ensure libpython.so ends up in the .dev package
Drop PRIORITY variable
gcc: Fix removal of libiberty.a
gcc: Remove unneeded module .la file and .so link
gcc-package-cross: Switch to using pattern matching to detect when to stash libgcc into the sysroot
gcc: Fix unpackaged files warnings, broken symlink and superfluous files
tcmode-default: Define UCLIBCVERSION and set it to 0.9.32
binutils: upgrade from 2.21 to 2.21.1
gcc-runtime: fix installed but unpackaged files
eglibc: bump PR for OLDEST_KERNEL change
eglibc: avoid copying ${libdir} twice if it's the same as ${base_libdir}
eglibc: unbash ldd (from oe.dev)
eglibc: add RDEPENDS for bash on eglibc-utils
tcmode-default: update binutils version
gcc: Fix packaging correctly
python: fix for libdir=/usr/lib64 case
python-native: fix for non /usr/lib libdir case
python: Fix libdir usage which broke python packaging
eglibc: ensure that NSS libs go into the right package when ${base_libdir} and ${libdir} are the same
Patches: Fix Upstream-Status info
binutils: package unpackaged files
eglibc: fix installed but not packaged files
eglibc: fix runtime assertion failure
eglibc: fix packaging of thread_db
gcc-4.6: update to 4.6.1 release
gcc-package-target: don't fail if the .la files we try to delete are not there to start with
eglibc: Tighten LICENSE Fields
gcc: Add gcc configure for PowerPC e500v2/SPE embedded floating point ABI
tclibc-*libc: Utilize TARGET_FPU for gnuspe setting
gcc_4.5.1: fix arm_bswapsi2.patch
gcc_4.5.1: add pr43810.patch
gcc_4.5.1: add pr44290.patch
gcc_4.5.1: add pr44606.patch
gcc_4.5.1: add pr45094.patch
gcc_4.5.1: add pr45052.patch
gcc_4.5.1: add pr45886.patch
binutils: Fix build when compiling target binutils recipe with gcc 4.6
libgcc: correct mode on libgcc_s.so.1 to ensure it gets stripped
Add endianess macros used by previous endian-ness_handling.patch
python-native: Mangle scripts to use /usr/bin/env python, bump PR
tcmode-default: set preferred version also for (e)glibc-locale
eglibc-package: don't fail without localedef/gconv
python: save Makefile.sysroot in do_compile
python: add patch to fix cross compilation on host with linux-3.0
default-versions: Update pulseaudio as arm no longer needs a seperate backport
python: fix security vulnerability
gcc-4.6: Fix packaging of native toolchains
Move architecture specific TARGET_OS mangling into tune files
eglibc: remove unnecessary FILESPATHPKG usage
binutils: Fix multilib header conflict - bfd.h
eglibc_2.13: Resolve multilib header conflicts
multilib: Add support for compiling recipes against multiple ABIs
eglibc: fix for multilib RPROVIDES issue
gcc: Drop part of the 64bithack patch which is no longer used
glibc: deleted
eglibc: Add missing ${PN} and ${PKGSUFFIX} usages
gcc: Fix setting of GLIBC_DYNAMIC_LINKER
eglibc-locale: Specially handle FILES_eglibc-gconv for multilib
multilib: Use BPN instead of PN for style like lib${PN}
eglibc-package.inc: Fixed error in referencing PKGSUFFIX
binutils: Add support for powerpc e5500 core
glibc: Remove unused version
eglibc: fix build for armv4 machines
eglibc_2.13: Add support for handling sqrt & sqrtf on powerpc
eglibc: Fix patch merge breakage
gcc-4.6: Add support for the e5500 PowerPC core
eglibc-locale: Added ${MLPREFIX} for task dependency.
gcc: use ${base_lib} to match gcc default configuration
python-native: Fix a compiler finding issue
eglibc: remove PACKAGES from eglibc.inc
eglibc: force GLIBC_EXTRA_OECONF to not be uset for nativesdk
gcc: Various fixups to ensure consistent gcc builds
eglibc: Modify ldd script according to multilib config.
eglibc: check dependencies among eglibc options
libgcc: Remove fetch/unpack/patch noexec stamps
recipes: Delete patch=1, its default and replace pnum with striplevel
bitbake meta-toolchain with gcc 4.5.1 failed
gcc-4.6: Drop gcc-poison-parameters.patch as its not need
gcc-4.5.1: Drop gcc-poison-parameters.patch, replace with bug fix patch
eglibc: fix gconv packaging after 5486cac29db6e67051fff7637a0abc9aeab661e5
binutils: update to 2.21.1a
tcmode-default: update binutils version
eglibc-locale.inc: Add eglibc-binaries, eglibc-localedatas, eglibc-gconvs and eglibc-charmps to variable PACKAGE
gcc: Fix multilib baselib confusion
gcc: add patch for ice 50099, which caused lttng-ust not to build
python-native: add link for python2
eglibc-2.13: Replace oewarn with bbwarn
Add a run-time dependency that eglibc support GNU_HASH
python: Fix cgi.py runtime issue
gcc: include plugin-related headers into packaged SDK
eglibc: fix packaging of some of nativesdk packages
Revert "eglibc: fix packaging of some of nativesdk packages"
eglibc-2.12: Fix build on powerpc/603e
gcc: fix possible problems with nscd compilation during eglibc-nativesdk build
gcc: include libgcov.a into libgcc-dev package
gcc: Fix two QA issues
conf,recipes: Add new variable LINKER_HASH_STYLE
gcc-4.6: Use --with-linker-hash-style configure option
eglibc: Add recipes for 2.14
multilib: remove the multilib handling to allarch
gcc-4.6: Update to tip of FSF gcc-4_6-branch
python: fix sqlite RPATH issue
gcc/binutils: Disable NLS/gettext dependencies
python-argparse: import from meta-oe, needed for newer glib
eglibc: Drop 2.12
gcc: Drop old version 4.5.1
Import python-setuptools from meta-oe (for glib-2.0)
farsight2, ldconfig-native, gnutls: There is no GPLv2.1, correct the fields
eglibc-2.14: add patch to fix libdl crash
gcc-4.6: Upgrade SRCREV to latest FSF 4.6 branch
gcc-4.6: Backport PR46934 fix
python-scons: upgrade from 2.0.1 to 2.1.0
python-dbus: upgrade from 0.83.2 to 0.84.0
tcmode-default.inc: Add TRANSLATED_TARGET_ARCH suffix to binutils-cross-canadian
binutils-cross-canadian: Point sysroot to correct location
gcc-configure-sdk: Point sysroot to correct location
gcc-4.6: Backport fix for PR32219
python, python-native: upgrade from 2.6.6 to 2.7.2
python: update generate-manifest for 2.7 version and regenerate it
update python 2.7 manifest
python-2.7.2: fix build issues when additional modules are linked against host or native libpython instead of target
recipes: bump PR after python upgrade
linux-libc-headers: provide 3.0.x and 3.1 headers
python: improve packaging
python: skip setup.py 'import check' when cross-compiling
Convert to use direct access to the data store (instead of bb.data.*Var*())
python: bump PR
gcc-4.6: fix toolchain build for SH4
python-gst: upgrade from 0.10.21 to 0.10.22
gcc-4.6: Fix gcc ICE on qt4-x11-free/armv7-a
eglibc_2.13: update SRCREV
eglibc.inc: Remove EGLIBPARALLELISM from deps for EXTRA_OEMAKE
gcc-package-target.inc: add the symbol link /lib/cpp
pulseaudio: update to 1.1, delete 0.9.x
python-native: Fix gcc compiler detecting logic
Introduce multiarch DISTRO_FEATURE
binutils: upgrade from 2.21.1a to 2.22
eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
PR Bump for OpenSSL 1.0
Fix multiarch DISTRO_FEATURE
classes, conf: Exclude native and nativesdk recipes from libc specific override
binutils: fix for .debug files QA warnings
tcmode-default: Remove pinning u-boot-mkimage-native to non-existing version
gcc: Backport patch from trunk to fix ICE seen on armv7 with mesa-xlib
eglibc: Update 2.14 recipes to latest SVN tip
OECore license fixes: meta/*
eglibc: Generate cross testing script during install
python: bump PR due to arm OVERRIDES change
cross-recipes: Disable nls in gettext bbclass
Patch Upstream Status Updates
libgcc: reintroduce debug package, containing symbols
eglibc-testing: Clean the test before running them
[PATCH 2/4] gcc-cross: Add cross testing driver for running regression testsuites
gcc-4.6: Let G++ relocate gxx-include-dir when using --sysroot option
eglibc: Fixes for running regression tests
python-pycairo: Upgrade to 1.10.0
binutils: fix building on distros with matching binutils version
python: add md5module support
Add Upstream-Status to patches
gcc: mark upstream status for all patches
python-native: correct prefix handling for oe-core sysroot layout
binutils-cross-canadian: Allow ld-is-gold
native.bbclass: Fix variable remapping coverage
python-pycairo: fix for x32
eglibc: Upgrade recipes 2.14 -> 2.15
python-native: RPROVIDE python-core-native since pycurl-native depends on it
binutils-cross-canadian: Clear BBCLASSEXTEND as a native version of this recipe makes no sense
locale: fix package's "provides" tag
gcc: Ensure that the shared source directory shared the same sstate hashes
gcc-package-cross.inc: Mark do_package* tasks as noexec
gcc_4.6.bb: Drop duplicated SRC_URI component
eglibc: refactor packages for staticdev
binutils: refactor packages for staticdev
libgcc: Seperate out libgcov.a from libgcc-dev
gcc: move shared .a to their own package
gcc-common.inc: Ensure WORKDIR doesn't adversly affect sstate checksums
gcc-common.inc: Fix comment
gcc-cross: Don't reference machine specific variables
eglibc-2.15: Add upstream status for x86_fenv.patch
libgcc: Add INSANE_SKIP of staticdev for libgcc-dev and libgcov-dev
gcc-runtime: fix override from poky-lsb to linuxstdbase
python-dbus: upgrade from 0.84.0 to 1.0.0
binutils: fixes for build with an external csl toolchain
eglibc-package.inc: don't include debug files in -pic
python: Fix build failure of python-elementtree on x86_64
gcc-cross-testing: Fix evaluation of user and target name
uclibc: Upgrade recipes from 0.9.32 -> 0.9.33
tcmode-default: add preference for gdb/gdbserver
zlib: Upgrade 1.2.5 -> 1.2.6
gcc-4.6: Some small performance tweaks
gcc: Ensure same sstate hashes for shared soruce directory
recipes: bump PR to rebuild .la files without libz.la
gcc: Excluding the DATE/SRCDATE from do_patch dependency.
Add sanity checks for eglibc locale
python: add Makefile to SSTATE_SCAN_FILES
eglibc: Fix package warning
Quoting fixes
More quoting fixes
eglibc-testing: Fix testing script to work well with dash
gcc-cross.inc: Fix cross testing scripts to work with dash
meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)
gcc: Upgrade to 4.6.3 release
package.bbclass: Drop python depends from rpmdeps
python-pycairo: Fix incorrect versions in license field
python, python-native: always set platform to linux2
python: regenerate plat-linux2/*.py
python: depend on bzip2
python-native: distutils: don't use libdir, remove dead code path
python, python-native: bump PR
python: package static libraries correctly in -staticdev
gcc-cross: aviod creating invalid symlinks
Revert "gcc-cross: aviod creating invalid symlinks"
python: regenerate python-2.7-manifest.inc
python-imaging: bring in fixes from meta-oe
python: fix install when libdir is not "lib"
python-pyrex: quite packaging warnings
python-pycurl: fix packaging warnings
libc-common: Apply Debian-naming to libc debug symbols too
nativesdk/misc: set PKGSUFFIX for correct variable name expansion.
libgcc: corrected -nativesdk package namings.
python: remove a target dependency
linux-libc-headers: set default LINUXLIBCVERSION to 3.2
gcc-cross-canadian: Fixed packaging warnings.
python: fix packaging dependencies on minimal systems
gcc-cross-canadian: Clean non shipped empty directories.
gcc-cross-intermediate: Ensure we move the libraries from the correct location
eglibc-2.15: Update SRCREV
eglibc: SDK_GLIBC_ADDONS for eglibc-nativesdk.
binutils: Inform binutils that armv5e really is valid!
gcc-cross-intermediate: fix do_install for x32
eglibc packaging: locale packaging configuration
meta-toolchain: runqemu falied on FC16/Opensuse12.1 x86_64
python: Fix host contamination issue
tclibc-eglibc.inc: make locale packages dependency conditional
python: multilib header support.
gcc-4.6: Add fix for relocation problem and ccache
PR bump packages with gdbm in DEPENDS
eglibc: fix re-execution of task
eglibc: fix perl path in target scripts on fedora 17 alpha
Revert "eglibc: fix perl path in target scripts on fedora 17 alpha"
eglibc: fix builds on fedora 17 alpha
gcc-configure-common.inc: Stop gcc looking at build system paths
python: Fix re-execution problem due to patching configure and configure.in
python: Fix various contamination issues leading to broken/missing c modules
python: use PKGSUFFIX for libpython2
binutils: add embedspu for ppc builds
libgcc: Package additional *crt*.o files for PPC
gcc: Add plugins package for ARM, fix /usr/incude packaging
python: Add patch for 64bit platform
python: Add patch to search for db.h in inc_dirs and remove warning
python: Add patch to avoid warning about bsddb module
python: Add patch to avoid warning about _tkinter
python: Add patch to avoid warning about sunaudiodev module
tcmode-default: Use SDKGCCVERSION ?= "${GCCVERSION}"
gcc-configure: Pass distinct target flags
gcc: Stash the gcc-cross builddir to reuse in libgcc and gcc-runtime
gcc-configure: Render --with-local-prefix harmless
libgcc_4.6: Package libgcov nativesdk correctly
gcc-4.6: Remove redundant overrides
gcc-4.6: Specify complete paths in require directive
gcc-configure-common.inc: Use libc-uclibc override
gcc-4.7: Add recipes
gcc-4.7: Define own do_configure_prepend
gcc-cross-canadian_4.7.bb: Override ARCH_FLAGS_FOR_TARGET
gcc-crosssdk-intermediate: Use --with-native-system-header-dir for 4.7
gcc-package-target: Add the dangling files to specific packages
gcc-4.7: Disable cloog and ppl
gcc-4.7: Lower the internal consistency check level to release
libgcc-4.7: Package libgcov nativesdk correctly
gcc-4.7: Use full relative path in require directive
gcc-4.7: Let cpp specs honor include searches in relocated install tree
gcc-4.7: Do not use --with-header option for cross-gcc
gcc-package-sdk: Package plugin files generated by gcc-4.7
tcmode-default.inc: Default to gcc 4.7
tcmode-default.inc: Update to eglibc 2.15 everywhere
gcc-cross.inc: Fix cross testing script
eglibc-package: remove /var
libgcc: Add MLPREFIX to sanity check skip
tclibc-eglibc: drop hardcoded locale-base-en-us/en-gb
python: upgrade from 2.7.2 to 2.7.3
gcc-package-target: add libexec for plugin
gcc-4.6: explicitly disable ppl
gcc-4.6: disable cloog, change syntax to disable ppl
libc-package.bbclass: Add MLPREFIX while dynamically set RDEPENDS
eglibc: Add patch to fix /var installation location
eglibc: Add patch to fix /var installation location
eglibc: fix build with poky-tiny distro
gcc-4.6, gcc-4.7: Add support for building mips64 cross compiler
binutils: Default to n64 when configured for mips64
eglibc-2.15: Support mips64
gcc-4.7: Add knowledge about arm hf dynamic loader
eglibc: Add ARM hf dynamic linker support
gcc: Grok for callconvention-hard to enable hard float
eglibc: package mtrace separately
python: bump PR of packages after update of distutils.bbclass
binutils: Drop old/stale/broken csl recipe
binutils: use new update-alternatives
binutils_2.22: Backport to fix bogus textrels
gcc-common: Enable hardfloat ABI when target is arm
gcc-common: Replace use of TARGET_ARCH with TRANSLATED_TARGET_ARCH
linux-libc-headers: set default LINUXLIBCVERSION to 3.4
gcc-configure-common: Use build time sysroot for target gcc
gcc-configure-target: Fix sysroot option breakage I introduced (sorry)
eglibc: added ac_cv_path_ to CACHED_CONFIGUREVARS
gcc-target: ensure target packages have the correct virtual package names
gcc-cross: argument list too long when do_install
eglibc-package: Update PACKAGES and files based on new ordering
binutils: Add with-sysroot to target binutils
binutils: Enable plugins by default
gcc-4.7: Update to tip of gcc-4_7-branch since 4.7.1 has been out
gcc: Fix a case of sysroot with trailing / and gxx-include-dir leading slash
gcc-4.6: Retire into toochain-layer
eglibc-2.13: Retire into toolchain layer
gcc: Remove csl gcc recipes
tcmode-default: Update gzip PREFERRED_VERSION to 1.15
libgcc: Remove unpackage unwind.h
gcc-configure-sdk, gcc-configure-cross: Dont recompute USE_NLS
eglibc-2.15: Update to latest on 2.15 branch
eglibc: support mipsel little endian, filter out -march=mips32
gcc: fix collect2 host contamination problem properly

get error:

sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sh: glibc:: command not found
sed: -e expression #1, char 26: unknown command: `u'
sed: -e expression #1, char 30: unknown command: `u'
sed: -e expression #1, char 44: unknown command: `S'
sed: -e expression #1, char 40: unknown command: `u'
sed: -e expression #1, char 48: extra characters after command
sed: -e expression #1, char 23: unknown command: `u'
sed: -e expression #1, char 36: unknown command: `6'
sed: -e expression #1, char 17: extra characters after command
sed: -e expression #1, char 48: extra characters after command
sed: -e expression #1, char 29: unknown command: `*'
sed: -e expression #1, char 42: extra characters after command
sed: -e expression #1, char 26: unknown command: `S'
sed: -e expression #1, char 24: extra characters after command
sed: -e expression #1, char 33: unknown command: `*'
sed: -e expression #1, char 12: unknown command: `m'
sed: -e expression #1, char 41: unknown command: `O'

Try replacing sed with:

grep -F "$line" file2

--
or replace everything with:

awk 'NR==FNR{A[$1]; next} $2 in A' file1 file2

It's strange that if I instead with "grep -v "$line" file2" it will go endless loopI want to show the file2'line that not contains file1

Thanks
Lei

---------- Post updated at 02:50 AM ---------- Previous update was at 02:44 AM ----------

sorry,it's not a endless loop, I make a mistake, actually want to show the file2 which not contains file1's line, how could I do that

---------- Post updated at 02:52 AM ---------- Previous update was at 02:50 AM ----------

and with below cmd

while read line
do
    sed -i '/${line}/d' ./file2 #to delete the line which contains in file1
done < ./file1

it will casue error, I don't know why

That will not work, since then all every time all lines that are not equal to the search string, will get printed.. You would need to test grep's return code and print "$line" if it is non-zero...

The sed command will not work because of the / delimiter, the is also contained in the files so that breaks the command... You would need to use another delimiter..

try:

awk 'NR==FNR{A[$1]; next} !($2 in A)' file1 file2

---
On Solaris use /usr/xpg4/bin/awk rather than awk

Hi,

Nothing output from above awk line

"The sed command will not work because of the / delimiter"
if I change the sed to sed -i '%${line}%d' file2 it still get error

sed: -e expression #1, char 1: unknown command: `%'

---------- Post updated at 07:58 AM ---------- Previous update was at 07:16 AM ----------

with your awk it ouput lots of line not expected

You did not show the desired output for the sample data, so I'm assuming that your goal is to print out each line in file2 that contains a line in file1 as a substring.

grep -Ff file1 file2

Regards,
Alister

---------- Post updated at 12:02 PM ---------- Previous update was at 11:58 AM ----------

To use a different delimiter for an address, the opening delimiter must be backslash-escaped (this is not necessary when using a different delimiter to delimit the components of a substitute, s, command).

However, any sed solution will treat literal text as a regular expression. That is a very poor approach. Each . in file1 will match any character at all. Each * will allow the preceding character to occur an arbitrary number of times, or to not occur at all. And so it goes with all regular expression metacharacters.

Regards,
Alister

OW yes you went back to using single quotes, double quotes is what you would need..
try:

sed -i "\%${line}%d"

It would be inefficient though..

The awk is not producing any output since every record of file2 is contained in file1 so the output should be empty. Otherwise, what do you expect the output (you did not explicitly specify) to be?

I remind it should be sed -i "%${line}%d" (not work) but I see you add \ before the first % and it works

Lei

---------- Post updated at 10:20 AM ---------- Previous update was at 10:06 AM ----------

this sed still can't work in some cases.
I want to delete the file2'line when the line contains the content of file1

file2

3gdgdgd python: regenerate plat-linux2/*.py
34sfddf python: depend on bzip2
fdererf the good test

file1

python: regenerate plat-linux2/*.py

i want to get below for file2

34sfddf python: depend on bzip2
fdererf the good test

with below code it still not work

#!/bin/bash
#s=`cat file1 |awk -F "zzzzzz" '{print $2}' |sed -n "${n}p"`
while read line
do
sed -i "\%${line}%d" file2
done < file1

sed cannot be made to work correctly, unless you escape every single basic regular expression metacharacter. And, since some characters are special in some situations and not in others, you cannot naively place a backslash before every one of them; you'll have to build a basic regular expression lexer and parser. Or ...

You should stop treating literal text as regular expressions. Use awk, grep, or some other tool that can treat arbitrary input as a literal string.

Here's another line in your sample data that will cause a problem:

[e]glibc-package.inc: fix providers for libsegfault and other

As a regular expression, it won't match itself (because the [e] won't match the brackets themselves).

Regards,
Alister