Skip to main content

All Questions

48votes
4answers
29kviews

Using sed to color the output from a command on solaris

I have a ksh script that must work on both linux and solaris. I'm trying to color the output of specific commands. It works on linux (specifically RHEL6), but not on solaris (SunOS 5.10). Command ...
acm's user avatar
  • 583
4votes
2answers
19kviews

Replace all occurrences of a character in a variable using korn script

Part of the Korn script I am writing requires that I replace all occurrences of the ' character with two occurrences (''). I am trying to log some SQL that I am generating in this script to a column ...
Ben's user avatar
  • 205
3votes
5answers
449views

Get values block by block in same file

I have a file say "SAMPLE.txt" with following content, P1 10,9:6/123456 P2 blah blah P1 10,9:5/98765 P2 blah blah P1 blah blah P2 I want a output file say "RESULT.txt" as, Value1:123456 Value2:98765 ...
Garvit Khandelwal's user avatar
2votes
6answers
656views

Getting the matched word exactly

I have looked through a number of question but they do not satisfactorily reply to my question. I need to print words that match the pattern exactly not the lines containing that word. For example: ...
haldar55's user avatar
1vote
6answers
2kviews

Hexadecimal number sequence checker in Linux?

I have a list of hexadecimal number. I would like to check whether they are in sequence or not. That is, they should be consecutive numbers, in increasing order. In other words, there should be an ...
ayrton_senna's user avatar
1vote
1answer
123views

Parsing a file with several conditions

i want to create a script to parse a file. These are what i need to do; I want to take the first line only of every app. I want to check only columns 1,3,4. If an app has more than Instance i want ...
Hüseyin Erkmen's user avatar
1vote
1answer
4kviews

Reading the contents of the file and splitting using ksh

We're using a ksh script for installing one product. I've another config file, I'd need to read this configuration file from my main script Content of the Configuration file: BPWS_Instance_1:Linux:...
user31522's user avatar
0votes
2answers
339views

How to check the headers between 2 CSV files in unix?

File1 - filename.csv File2 - filename.csv I wanted to compare the headers between these 2 files in linux using a ksh script. case 1:- Say, the header of file1 is INPUT --> NAME,UNIT CODE, VAR ...
Jay's user avatar

close