Sponsored Content
Top Forums Shell Programming and Scripting Is it possible to use sed to handle the line contains BOTH "AA" and "BB" Post 302748893 by yanglei_fage on Thursday 27th of December 2012 04:54:40 AM
Old 12-27-2012
Is it possible to use sed to handle the line contains BOTH "AA" and "BB"

if yes, can some expert give an example

Lei
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

5. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
RCCONF(8)							 Debian GNU/Linux							 RCCONF(8)

NAME
rcconf - Debian Runlevel configuration tool SYNOPSIS
rcconf [options] DESCRIPTION
Rcconf allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off. Rcconf gets a list of services from /etc/init.d and looks in the /etc/rc?.d directories to determine whether each service is on or off. Rcconf detects ON state by existence of /etc/rc?.d/"S"NNname. If the number(NN of /etc/rc?.d/[SK]NNname) is not 20(default), rcconf saves the service name and the number in /var/lib/rcconf/services so as to be able to restore the service to its original configuration. If you purge rcconf package by 'dpkg --purge' or 'aptitude purge' or others, you may lose off state package due to deletion of /var/lib/rcconf/services. OPTIONS
--help Print out a usage message. --dialog Use dialog command to display menu --whiptail Use whiptail command to display menu --notermcheck Do not set window size by terminal property. --on service[,service,...] Set services to be on. This option enables rcconf in command line mode and no select menu will be displayed. --off service[,service,...] Set services to be off. This option enables rcconf in command line mode and no select menu will be displayed. --list List services which includes current status(on/off). This option enables rcconf in command line mode and no select menu will be displayed. Use --expert option together if you want to list all services. This result can be used as config_file of --config. --config config_file Set services on/off according to config_file. This option enables rcconf in command line mode and no select menu will be displayed. The format of this config file is "service_name on" or "service_name off" in each line. Refer to the result of --list. --expert Show and select all services for experts. In default, rcconf doesn't display system default services as a candidate such as mountall.sh to hide unnecessary services for users(but very important for system). The list of which services are considered expert can be found at the line @expertonly in /usr/sbin/rcconf. --now For each service that had the links changed, call the corresponding /etc/init.d/service-name script using invoke-rc.d, so the package starts or stops immediately. If you do not use this option, the changes will only take effect the next time you reboot (or change runlevel). --verbose Output verbose messages. Guide File Rcconf can display some description(Guide) for each services with Guide File. Guide File is placed on /var/lib/rcconf/guide, and this Guide File does not exist by default. If you want to use Guide, you need to define guides for each services in this file. If you run update-rcconf-guide before rcconf, rcconf can use default guides derived from package description. Update-rcconf-guide generates the file '/var/lib/rcconf/guide.default' from package description(only uses first line of it) using apt-cache. Rcconf refers Guides in /var/lib/rcconf/guide before /var/lib/rcconf/guide.default. If you install some packages after executed update-rcconf-guide, you need to re-create this file using update-rcconf-guide so as to refresh guide.default that includes new guides for installed new services. Updating /etc/rd?.c/ by the package(KNOWN PROBLEM) Rcconf saves /etc/rc?.d/[SK]NNname conditions into /var/lib/rcconf/services. This file is updated only when there exists /etc/rc?.d/SNNname. It means that the condition is not saved if /etc/rc?.d/SNNname doesn't exist for the package. If the old version of the package creates both /etc/rc?.d/SNNname and /etc/rc?.d/KNNname but the newer(updated) version of the package creates only /etc/rc?.d/KNNname, some stupid condition occurs. That is, rcconf displays this package as OFF state even as the updated package doesn't have /etc/rc?.d/SNNname. That is because rcconf can't detect disappearance of /etc/rc?.d/SNNname and previous /etc/rc?.d/SNNname condition remains in /var/lib/rcconf/services for restore. In that situation, remove the entry(corresponding package line) from /var/lib/rcconf/services. FILE
/var/lib/rcconf/services The service number data file. /var/lib/rcconf/lock Lock file. /var/lib/rcconf/guide.default Guide File update-rcconf-guide generates. /var/lib/rcconf/guide Guide File user(Administrator) can define. SEE ALSO
update-rc.d(8) update-rcconf-guide(8) AUTHOR
Atsushi KAMOSHIDA <kamop@debian.org> perl v5.10.1 2009-11-17 RCCONF(8)
All times are GMT -4. The time now is 01:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy