It's going to take me a while to understand your code before I can fine tune it (I'm a beginner). It's close to being correct, but has a few problems.
- When the script finds the flag "UWI", it returns too much information (ie. Data1 + unecessary text). Note: The start and end points of the data I want to extract are fixed positions in each file.
- When the script finds the flag "LSR", it returns information to the right of what I want. The only difference between the UWI and LSR flags is that they are on different lines, the piece of text I want to extract from each line is positioned in the same place in each line.
Let me have a look at it today and I'll reply tomorrow.
Hello,
I am trying to write a bash shell script that does the following:
1.Finds all *.txt files within my directory of interest
2. reads each of the files (25 files) one by one (tab-delimited format and have the same data format)
3. skips the first 10 rows of the file
4. extracts and... (4 Replies)
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Hi,
I have a directory full of *.txt files. I would like to print the last line of every file to screen.
I know you can use FNR for printing the first line of each file, but how do I access the last line of each file?
This code doesn't work, it only prints the last line of the last file:BEGIN... (5 Replies)
Hello everyone, I'm new to this forum and i am new as a shell scripter.
my problem is to have html files in a directory and I would like to extract from these some data that lies between two different lines
Here's my situation
<td align="default"> oxidizability (mg / l):
data_to_extract... (6 Replies)
Hi!
I have one file with data that looks like this:
1 data data data data
2 data data data data
3 data data data data
.
.
.
1 data data data data
2 data data data data
3 data data data data
.
.
.
I would like to have awk to write each block to a separate file, like this:
1... (3 Replies)
I am trying to extract common list of Organisms from different files
For example I took 3 files and showed expected result. In real I have more than 1000 files. I am aware about the useful use of awk and grep but unaware in depth so need guidance regarding it.
I want to use awk/ grep/ cut/... (7 Replies)
Hi, I'm trying to get some data from an html file, but the problem is before it can extract the information I have multiple patterns that need to be passed through.
https://www.unix.com/shell-programming-scripting/150711-extract-data-awk-html-files.html
Is a similar problem. The only... (5 Replies)
Hi,
I have directory with multiple files from which i need to extract portion of specif lines and insert it in a new file, the new file will contain a separate columns for each file data.
Example:
I need to extract Value_1 & Value_3 from all files and insert in output file as below:
... (2 Replies)
Greetings experts,
Have 2 input files, of which 1 file has 1 record per line; in 2nd file, multiple lines constitute 1 record; Hence declared the RS=";"
Now in the first file which ends with ";" at each line of the line; But \nis also being considered as part of the data due to which
I am... (1 Reply)
HOBBITLAUNCH(8) System Manager's Manual HOBBITLAUNCH(8)NAME
hobbitlaunch - Master program to launch other Xymon programs
SYNOPSIS
hobbitlaunch [options]
DESCRIPTION hobbitlaunch(8) is the main program that controls the execution and scheduling of all of the components in the Xymon system.
hobbitlaunch allows the administrator to add, remove or change the set of Xymon applications and extensions without restarting Xymon - hob-
bitlaunch will automatically notice any changes in the set of tasks, and change the scheduling of activities accordingly.
hobbitlaunch also allows the administrator to setup specific logfiles for each component of the Xymon system, instead of getting output
from all components logged to a single file.
OPTIONS --env=FILENAME
Loads the environment from FILENAME before starting other tools. The environment defined by FILENAME is the default, it can be
overridden by the ENVFILE option in hobbitlaunch.cfg(5)--config=FILENAME
This option defines the file that hobbitlaunch scans for tasks it must launch. A description of this file is in hobbitlaunch.cfg(5)
The default tasklist is /etc/hobbitlaunch.cfg
--log=FILENAME
Defines the logfile where hobbitlaunch logs information about failures to launch tasks and other data about the operation of hobbit-
launch. Logs from individual tasks are defined in the hobbitlaunch.cfg file. By default this is logged to stdout.
--pidfile=FILENAME
Filename which hobbitlaunch saves its own process-ID to. Commonly used by automated start/stop scripts.
--verbose
Logs the launch of all tasks to the logfile. Note that the logfile may become quite large if you enable this.
--dump Just dump the contents of the hobbitlaunch.cfg file after parsing it. Used for debugging.
--debug
Enable debugging output while running.
--no-daemon
hobbitlaunch normally detaches from the controlling tty and runs as a background task. This option keeps it running in the fore-
ground.
STARTING TASKS
hobbitlaunch will read the configuration file and start all of the tasks listed there.
If a task completes abnormally (i.e. terminated by a signal or with a non-zero exit status), then hobbitlaunch will attempt to restart it 5
times. If it still will not run, then the task is disabled for 10 minutes. This will be logged to the hobbitlaunch logfile.
If the configuration file changes, hobbitlaunch will re-read it and notice any changes. If a running task was removed from the configura-
tion, then the task is stopped. If a new task was added, it will be started. If the command used for a task changed, or it was given a new
environment definition file, or the logfile was changed, then the task is stopped and restarted with the new definition.
SEE ALSO hobbitlaunch.cfg(5), xymon(7)Xymon Version 4.2.3: 4 Feb 2009 HOBBITLAUNCH(8)