So if the input file is considered as space separated, do you want each message sent to a file based on column 8 (they are all 404 in your example)
You could use less processing with:-
If you want to base it on the first bit of column 7 (the pl, uk or common bit) you need another tweak to split up to column:-
Of course, you could use both if you with, so your output file will become /path/to/file-$ref-$h or whatever.
If you have codes in column 8 that are errors for one file and others for just loggings, you could:-
.... or again some combination with other suggestions to build your output name.
I'm not sure I've understood the question, but these are a few options for what I think you are after.
If I've got it wrong, can you post some input and the expected out with the relevant file names you want to generate and I will have another go.
Robin
Last edited by rbatte1; 06-04-2014 at 08:35 AM..
Reason: Just tidying the formatting of comments in the code.
Hi,
I've a shell script e.g.
#!/bin/bash
echo "Enter the next hop id"
read nhid
echo "enter the IP address"
read IP
echo "enter the interface name"
read name
echo "enter the enable/disable state"
read state
exit 0
now from this script i want to search strings in another (.cam)
... (6 Replies)
Hi,
We Perfrom Loads to the database through a Perl script which generates a statistics file. I need to read the statistics. the Statistics file looks something like below:
Process Beginning - 08-26-2010-23.41.47
DB2 CONNECTION SUCCESSFUL!
Ready to process and load file: FILENAME
# of... (2 Replies)
File name : Sample.txt
Actually i would like to read <schema>Oracle<schema> string from input file and return only once database as my output.
Please advise me.
Moved to appropriate forum. (1 Reply)
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display... (1 Reply)
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display which volume pool a given... (1 Reply)
Hi Don, this is not homework question. I work for a Credit card company and my development goal this year is to learn Unix. I would love if others can help me get started, thanks.
Hi everyone
I am new to Unix and need help writing a script that can ask user for an input, then search that input... (2 Replies)
Hello All
I have a pattern.txt file in source directory ((/project/source/) in linux server and data looks like:
123abc17
234cdf19
235ifg20
I have multiple log files in log directory (/project/log/) in linux server and data for one log file looks like:
<?xml version="1.0" processid... (11 Replies)
So, there is a large file where I have to conduct several search using bash shell scripting.
The file is like this:
TITLE and AUTHOR ETEXT NO. Aspects of plant life; with special reference to the British flora, 56900 by Robert Lloyd... (1 Reply)
I have a text file which is generated when the batch job is run. This batch may take few mins to run. When completed, the last line of the text file would be process completed. I need a shell script which will wait for this file till the process completed is printed in it, once found, it would move... (2 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT MOJAVE
tclsh
tclsh(1) Tcl Applications tclsh(1)__________________________________________________________________________________________________________________________________________________NAME
tclsh - Simple shell containing Tcl interpreter
SYNOPSIS
tclsh ?-encoding name? ?fileName arg arg ...?
_________________________________________________________________DESCRIPTION
Tclsh is a shell-like application that reads Tcl commands from its standard input or from a file and evaluates them. If invoked with no
arguments then it runs interactively, reading Tcl commands from standard input and printing command results and error messages to standard
output. It runs until the exit command is invoked or until it reaches end-of-file on its standard input. If there exists a file .tclshrc
(or tclshrc.tcl on the Windows platforms) in the home directory of the user, interactive tclsh evaluates the file as a Tcl script just
before reading the first command from standard input.
SCRIPT FILES
If tclsh is invoked with arguments then the first few arguments specify the name of a script file, and, optionally, the encoding of the |
text data stored in that script file. Any additional arguments are made available to the script as variables (see below). Instead of
reading commands from standard input tclsh will read Tcl commands from the named file; tclsh will exit when it reaches the end of the
file. The end of the file may be marked either by the physical end of the medium, or by the character, "