Linux Shell instances

Source: Internet
Author: User

UI Items Delete useless strings in the "UIL" file:

The script needs to develop a TXT file for the UIL file directory location & useless string, such as deleting a useless string from the Haier directory:

./delete_uil_string.sh.  /haier/ui_project/tv_uiproject_new/languages  ./unused_stringid.txt
#!/bin/bash# execution format such as: #./delete_uil_string.sh./haier/ui_project/tv_uiproject_new/languages./Unused_stringid.txtecho"Usage $ languagesdir unused_stringid.txt"#提取需要迭代的目录uil_files = ' ls $1  'unused_strid= ' Cat $2' echo $uil _filesecho"processing ..." forFbinch$uil _files Do     forStridinch$unused _strid Dosed-I."/\b$strid\b/d"$1/$fb # "\b" means the word ends or begins Donedoneecho"Finish"
Compare language excel->txt output useless string list "Unused_str.txt":
#!/bin/bash#./delete_unused_string.sh Language.txt Used_stringid.txtecho"Usage $ excel_convert.txt used_stringid.txt"echo $1echo $2excel_list= ' Cut-f1$1' Used_list= ' Cat $2' Flag=0Echo"Begin Delete ..."Declare-I. count=0Echo>Unused_str.txt forNinch$excel _list Do#echo $l used_list= ' Cat $2`     forMinch$used _list Do#echo $mif["$m"="$n" ]; Then flag=1             Breakfi Doneif[$flag-eq0 ]; Then Count= $count +1Echo"$n">>Unused_str.txt Echo"Not used $n"sed-I."/\b$n\b/d"$1    ElseFlag=0Fidoneecho"$count Unused String"Echo"Delete finished!"
Language.txt as follows:
ID Tchinese schinese Spanish French German Italian Portuguese Polish russianids_string_delete_a ll delete all remove all deletes all delete all delete all delete all delete all delete all Delete_allids_st    Ring_time clock Hora heure Zeit orario Hora czasвремяids_string_tv video output TV TV TV TV Tvтвids_string_version Edition versión version version Versione vers?o WERSJ Aверсияids_string_channel_name program names channel name the channel name Channel name Channel name Chan     Nel name Channel name channel Nameids_string_pause pausing pause pauses pause pause stop pause    Pauseids_string_channel Channel Canal Canaux Kanal Canale Canal Kana? каналаids_string_setting Setup settings Setting Setting Setting Setting Setting Setting Settingids_strin Av av av av g_av   AV avids_string_country National País Pays land Paese País Krajстранаids_string_favorite_li St Favorite folder Favoritos préférés favoriten elenco preferiti favoritos Lista ulubioneсписокизбран    Ныхids_string_1st_preferred_audio First choice of audio video first-of-the-line voice 1st, 1st Audio 1st Audio 1st Audio 1st Audio 1st Audio 1st audioids_string_timers Timer Timers Timers Timers Timers Timers Timers Timer    Channel No. sids_string_channel_number program number.    Channel No.    Channel No.    Channel No.    Channel No.    Channel No. Channel No.ids_string_usb_upgrade USB Upgrade USB Upgrade USB Upgrade USB Upgrade USB Upgrade USB UPG    Rade USB Upgrade USB upgradeids_string_ota_upgrade OTA upgrade Ota Upgrade Ota Upgrade Ota Upgrade    Ota Upgrade Ota Upgrade ota Upgrade ota upgradeids_string_date dates fecha date Datum Data Data data    Датаids_string_contrast Contrast degree contraste contraste kontrast contrasto contraste kontrastк    Онтрастids_string_brightness brightness Brillo Luminositéhelligkeit luminosita brilho jasno?? ЯРКОСТЬIDS_STRING_SPDIF Coaxial coaxial SPDIF SPDIF SPDIF SPDIF SPDIF SPDIF SPDIF
Used_stringid.txt as follows:
Ids_string_goodids_string_exitscaninfoids_string_dtvbraceids_string_dtvatvids_string_channelinfoids_string_ Modulationinfoids_string_programmetitleids_string_schedulesetupids_string_wrongpasswordids_string_ Cadtvmanualtuningids_string_qamtypeids_string_waitsearchingids_string_pleasesearchingids_string_normalids_ String_defaultsourceids_string_defaultprogids_string_firsttimeinstallids_string_audiolanguageids_string_ Subtitlelanguageids_string_pvrfilesystemids_string_hdmicecids_string_dbex_successids_string_errnousbdevids_ String_dbim_successids_string_pageuppagedownids_string_selectsortids_string_autovolumelevel

Linux Shell instances

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.