04-28-2020
Hi pulpwilkes and welcome to the forums
Some points missing:
- Use code tags for code
- What OS
- What language / shell?
--- Post updated at 06:35 ---
Thanks for the updates.
- Your 'desired' output still contains a value-b=true 'block' --> purpose or accident?
- What have you tried so far? (sry forgot to ask before)
This User Gave Thanks to sea For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Need to delete a text block inside a file, that is marked with a start and an end pattern. Eg
do not delete
not delete
<tag1>
delete everything here
here
and here
and here...
<tag2>
do not delete
do not delete....
Believe sed is able to do this job but don't get it working.
... (1 Reply)
Discussion started by: andre123
1 Replies
2. UNIX for Advanced & Expert Users
I'm having a couple of issues. I'm trying to edit a nagios config and remove a host definition if a certain "host_name" is found. My thought is I would find host definition block containing the host_name I'm looking for and output the line numbers for the first and last lines. Using set, I will... (9 Replies)
Discussion started by: mglenney
9 Replies
3. Shell Programming and Scripting
Hello all,
I have a text files that consists of blocks of text. Each block of text represents a set of Cartesian coordinates for a molecule. Each block of text starts with a line that has a only a number, which is equal to the total number of atoms in the molecule. After this number is a line... (15 Replies)
Discussion started by: marcozd
15 Replies
4. Shell Programming and Scripting
Input:
fstab is a configuration
file that contains information
of all the partitions
and storage devices
in your computer.
The file is located under /etc,
so the full path
to this file is /etc/fstab.
The >>>>> characters would be replaced by some texts.
For example if i run a... (5 Replies)
Discussion started by: cola
5 Replies
5. Shell Programming and Scripting
Hello all,
I have a large output file from which I would like to extract a single block of text.
An example block of text is shown below:
***** EQUILIBRIUM GEOMETRY LOCATED *****
COORDINATES OF ALL ATOMS ARE (ANGS)
ATOM CHARGE X Y Z
... (10 Replies)
Discussion started by: marcozd
10 Replies
6. Shell Programming and Scripting
Hello,
Although I have found similar questions, I could not find advice that
could help with our problem.
The issue:
We have several hundreds text files containing repeated blocks of text
(I guess back at the time they were prepared like that to optmize
printing).
The block of texts... (13 Replies)
Discussion started by: samask
13 Replies
7. UNIX for Dummies Questions & Answers
Hi
I am looking for the way to delete the block of data for example
original file
line1
line2
line3
line4
line5
input file
line2
line3
original file should contain
line1
line4
line5 (3 Replies)
Discussion started by: rakeshkumar
3 Replies
8. Shell Programming and Scripting
Hi,
I have a requirement in which i need to replace text as below -
<stringProp name="Recipe"><AddGroup Name="1001" Path="ServiceAdministration/Controls/1001/ServiceSwitches">
<Param Name="AttributeName" Value="HeaderManipRspIngressRuleSet" Type="String" />
<Param Name="Value"... (0 Replies)
Discussion started by: abhitanshu
0 Replies
9. Shell Programming and Scripting
Hei buddies,
Need ur help once again.
I have a file which has bunch of lines which starts from a fixed pattern and ends with another fixed pattern.
I want to make use of these fixed starting and ending patterns to select the bunch, one at a time.
The input file is as follows.
Hi welcome... (12 Replies)
Discussion started by: anushree.a
12 Replies
10. Shell Programming and Scripting
Hello all,
I am working on a script which should parse a large file called input.txt which contains table definitions, index definitions and comments like these ones:
------------------------------------------------
-- DDL Statements for table "CMWSYS"."CMWD_TEC_SUIVI_TRT"... (12 Replies)
Discussion started by: kiki_riki_miki
12 Replies
LEARN ABOUT CENTOS
rescan-scsi-bus.sh
RESCAN-SCSI-BUS.SH(1) User Commands RESCAN-SCSI-BUS.SH(1)
NAME
rescan-scsi-bus.sh - script for adding and removing SCSI devices without rebooting
SYNOPSIS
rescan-scsi-bus.sh [options] [host [host ...]]
OPTIONS
-a, --alltargets
scan all targets, not just currently existing [default: disabled]
-d enable debug [default: 0]
-l activates scanning for LUNs 0--7 [default: 0]
-L NUM activates scanning for LUNs 0--NUM [default: 0]
-w, --wide
scan for target device IDs 0--15 [default: 0--7]
-c enables scanning of channels 0 1 [default: 0 / all detected ones]
-r, --remove
enables removing of devices [default: disabled]
-f, --flush
flush failed multipath devices [default: disabled]
-i, --issue-lip
issue a FibreChannel LIP reset [default: disabled]
-u, --update
look for existing disks that have been remapped
-s, --resize
look for resized disks and reload associated multipath devices, if applicable
--forcerescan
rescan existing devices
--forceremove
remove and readd every device (DANGEROUS)
--nooptscan
don't stop looking for LUNs is 0 is not found
--color
use coloured prefixes OLD/NEW/DEL
--hosts=LIST
scan only host(s) in LIST
--channels=LIST
scan only channel(s) in LIST
--ids=LIST
scan only target ID(s) in LIST
--luns=LIST
scan only lun(s) in LIST
--sync, --nosync
issue a sync / no sync [default: sync if remove]
--attachpq3
tell kernel to attach sg to LUN 0 that reports PQ=3
--reportlun2
tell kernel to try REPORT_LUN even on SCSI2 devices
--largelun
tell kernel to support LUNs > 7 even on SCSI2 devs
--sparselun
tell kernel to support sparse LUN numbering
Host numbers may thus be specified either directly on cmd line (deprecated) or or with the --hosts=LIST parameter (recommended).
LIST: A[-B][,C[-D]]... is a comma separated list of single values and ranges (No spaces allowed.)
SEE ALSO
rescan-scsi-bus.sh Homepage: http://www.garloff.de/kurt/linux/#rescan-scsi
sg3_utils Homepage: http://sg.danny.cz/sg
rescan-scsi-bus.sh 1.57 leden 2014 RESCAN-SCSI-BUS.SH(1)