01-13-2016
AIX sed does not have EREs, therefore the proposed -E-switch will not work. Using -e declares the following just as a sed-expression and so does (in this case) nothing.
How about posting at east one line of the log you want to process and the result to be achieved? As you talk about colour codes, a hexdump of the line might help. Isolate the line, use print - "$line" | od -ax > /some/file and post the content of file.
I hope this helps.
bakunin
/PS: please note (and take to heart) the comment i editedinto your first post. I don't want to have to say that again.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file called get_columns.sh that I would like to replace $2 with $3. I have the following sed command written that works
sed s/'$3'/'$2'/g get_columns.sh > output.txt
However, when I try the command below, the file is empty.
sed s/'$3'/'$2'/g get_columns.sh > get_columns.sh
... (2 Replies)
Discussion started by: djschmitt
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Guys,
Working on a script in the Vi editor that requires the fifth column of a particular line changed.
e.g.
Name:Address:email:A
where "A" needs to be changed to what the variable $access holds ($access currently has the words admin access in it)
when I use this command :
`sed... (3 Replies)
Discussion started by: rc1138
3 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I have a shell script containing a command string in the following format:
command1 | command2 | cut -c9-16
The output from this is a record number (using characters 9-16 of the original output string) e.g. ORD-1234
I wish to save this value to a variable for use in later commands... (4 Replies)
Discussion started by: philjo
4 Replies
4. UNIX for Dummies Questions & Answers
HI!
I have a file that looks like this:
>ANKRD30_2kb
AAGTAACCAATGCAGGAAACCGAGAGGAGAGGTTTGGAAGGTGGTTTAGTGAGGTAATCCATCTTTTCT
AGTGATAAACTGGCACCCAGTCAATTTATTCATCAGAAGGGAATACATCAGCCTGGCGTGGTGGCTCGC
CCCCGACCCTGTCAGCGTCACCAGCAGCGCGGATCCATGGGCCAGAAGCCTCTAGGGCGCCTAAGTCAG
Number of residues in the... (9 Replies)
Discussion started by: vanesa1230
9 Replies
5. Shell Programming and Scripting
When I run this:
PDHDURL=`/usr/bin/curl --silent http://www.phdcomics.com/comics.php | /usr/bin/grep -o http://www.phdcomics.com/comics/archive/.*.gif | head -1`
echo -e "$PHDURL"
It is totally blank. However, when I just run it from the terminal:
/usr/bin/curl --silent... (2 Replies)
Discussion started by: killer54291
2 Replies
6. Shell Programming and Scripting
My script ssh's to another server and gathers information then process them. The problem is that the output of a command has an unwanted "blank lines".
...
ssh user1@${server1} /usr/bin/ls -l /tmp/file1 | awk '{print $5}' > ${DATAFILE}
...
$ cat ${DATAFILE}
123456789 (There's a blank... (7 Replies)
Discussion started by: pdtak
7 Replies
7. Shell Programming and Scripting
I am ssh to many servers to get some information... however sometimes the server is unreacheable and i am getting an error. I want to save that output to a file but I am not able to do so...
I want to be able to save output of bash into a file.. so when I run this command on a script
ssh... (5 Replies)
Discussion started by: eponcedeleonc
5 Replies
8. Shell Programming and Scripting
Hi all........
Plss do help me.......in a big trouble... :wall::wall::wall:
I have 3 directories named as :1. /home/shuchi/source
2./home/shuchi/destination
3./home/shuchi/filter
now the problem is /home/shuchi/source has say 2 files with extension .txt as given below :
A.txt
Code:
... (0 Replies)
Discussion started by: ektubbe
0 Replies
9. Shell Programming and Scripting
Hi all........
Plss do help me.......in a big trouble... :wall::wall::wall:
I have 3 directories named as :1. /home/shuchi/source
2./home/shuchi/destination
3./home/shuchi/filter
now the problem is /home/shuchi/source has say 2 files with extension .txt as given below :
A.txt
msisdn ... (5 Replies)
Discussion started by: ektubbe
5 Replies
10. Shell Programming and Scripting
Hi,
i need help with a file creation of an output program. I've got a program that with #find creates an output for each files in a directory.
If i give this command :
-o spec$(date -u +%Y%m%dt%H%M)
it creates just one file, overwriting all the others since it is the creation date .... (2 Replies)
Discussion started by: Board27
2 Replies
LEARN ABOUT CENTOS
platform::shell
platform::shell(n) Tcl Bundled Packages platform::shell(n)
__________________________________________________________________________________________________________________________________________________
NAME
platform::shell - System identification support code and utilities
SYNOPSIS
package require platform::shell ?1.1.4?
platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell
_________________________________________________________________
DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell.
This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only
requirement is that the other shell (identified by its path), is actually executable on the current machine.
While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell
this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run
32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers.
For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed
packages, versus the architecture of the shell running the repository software.
COMMANDS
platform::shell::identify shell
This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell.
platform::shell::generic shell
This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell.
platform::shell::platform shell
This command returns the contents of tcl_platform(platform) for the specified Tcl shell.
KEYWORDS
operating system, cpu architecture, platform, architecture
platform::shell 1.1.4 platform::shell(n)