Search Results

Search: Posts Made By: prash184u
4,837
Posted By prash184u
May be its environments... I am using the...
May be its environments... I am using the Solaris.

$ cat file1.txt
Reason : ABC
12345-0023
32123-5400
32442-5333

Reason : DEF
42523-3453
23345-3311

Reason : HIJ
454553-0001
$ awk...
4,837
Posted By prash184u
Thanks you all. But this one was perfect. ...
Thanks you all.

But this one was perfect.

You guys are the best.

---------- Post updated 08-25-10 at 09:23 AM ---------- Previous update was 08-24-10 at 04:23 PM ----------

A good...
4,837
Posted By prash184u
Sort the file contents in each group....print the group title as well
I've this file and need to sort the data in each group

File would look like this ...

cat file1.txt

Reason : ABC
12345-0023
32123-5400
32442-5333

Reason : DEF
42523-3453
23345-3311
...
8,163
Posted By prash184u
Thank you so much Durden_Tyler... GR8 help....
Thank you so much Durden_Tyler... GR8 help....
10,439
Posted By prash184u
Thanks...
Thanks for your reply ..

I am getggin this error when I run the command ..

awk: syntax error near line 1
awk: bailing out near line 1
10,439
Posted By prash184u
Print lines after the search string until blank line is found
All I want is to look for the pattern in the file...If I found it at # places... I want print lines after those pattern(line) until I find a blank line.





Log EXAMPLE :


MT:Exception...
8,163
Posted By prash184u
C'mon Gurus... All I want is to look for...
C'mon Gurus...

All I want is to look for the pattern in the file...If I found it at 5 places... all I want to do is print lines after those pattern(line) until I fond a blank line.



Log...
8,163
Posted By prash184u
@Phoenix : I may get above output number of...
@Phoenix :

I may get above output number of times in the result.
I just wanted to break the result lines if there is a blank line and go for the next set.

@Chris ...

Thanks Chris but the...
8,163
Posted By prash184u
Print #of lines after search string in a big file
I have a command which prints #lines after and before the search string in the huge file

nawk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r[(NR-c+1)%b];print;c=a}b{r[NR%b]=$0}' b=0 a=10 s="STRING1"...
6,241
Posted By prash184u
Okay .. I got most of the coding done It's...
Okay .. I got most of the coding done

It's not that hard to code but it's pain to write a long code....

this script gives you the time difference in HH:MM format with input given as parm1 and...
6,241
Posted By prash184u
Thanks Joey, You are right Carona, it does...
Thanks Joey,

You are right Carona, it does not work in Solaris.

But everyone is welcome to give some ideas ... you never know anything could work....

Meanwhile i am working on my own algo....
6,241
Posted By prash184u
Thanks for your advice but it's not my choice....
Thanks for your advice but it's not my choice....
6,241
Posted By prash184u
Ksh Solaris Time calculation problem..Please help
I've gone through bunch of threads on time calculations but none of them helps on my problem

I've to get the time difference in HHMM format from following inputs

Input 1 :

01/08/2010 01:30...
3,397
Posted By prash184u
my bad ... it was (echo "g/THREAD #2/d";...
my bad ...

it was (echo "g/THREAD #2/d"; echo 'wq') | ex -s temp_file.txt

cjcox ... I tired adding % in front of g it would not work...

methyl...Your poposal also does not delete the line...
5,772
Posted By prash184u
Thank you again to all ... I still have the...
Thank you again to all ...

I still have the problem but i will have to concentrate on other things now ... later when i will find and fix the problem i will post it out ...
3,397
Posted By prash184u
Easy ex editor command
I've this command in a script which edits the file ...

bash$ cat temp_file.txt
THREAD #2 2 Running
bash$ (echo "s/THREAD #2/d"; echo 'wq') | ex -s temp_file.txt
bash$ cat temp_file.txt
THREAD...
5,772
Posted By prash184u
once change here...
Thanks g.pi,

Can you please quickly make one change here

main.sh
-------------------------
#!/bin/ksh

PARM1=PARAMETER1
PARM2="PARAMETER2 -PARAMETER21 PARAMETER22"
echo "Invoking...
5,772
Posted By prash184u
Thanks for your reply ..
I've tried /usr/local/BATCH/runBatch.sh $1 "$2"

but still it does not work ...

Please make one script which handles parameters like i said ...

parameter 1 = PARAM1
parameter 2 = 'PARAM2...
5,772
Posted By prash184u
Running a BATCH script from my korn script with multiparameters
I've this BATCH script to run from my korn script...

The command is

/usr/local/BATCH/runBatch.sh PARAM1 'PARAM2 -PARAM21 PARAM22'
(runBatch takes

parameter 1 = PARAM1
parameter 2 =...
9,113
Posted By prash184u
Thanks funksen for your reply .. I've SunOS...
Thanks funksen for your reply ..

I've SunOS 5.10 and mailx does not have -a option.

But i found the problem .. the Body file has to have an empty line or space at the end of the file.
9,113
Posted By prash184u
mailx, uuencode problem
I've this command to run ...

Purpose : Send attachment file with e-mail body...
( E-mail body i read it from text file)

uuencode TEST_FILE.csv TEST_FILE.csv | cat...
1,832
Posted By prash184u
You could also use grep,nawk and tr commands ......
You could also use grep,nawk and tr commands ... Assumptions here are you want only IB4 in above example ...

$ vi output.ksh
#!/usr/bin/ksh
i=`grep -n "FAULT CODES CLASS" EXAMPLE.txt | cut -f 1...
Forum: Solaris 11-20-2008
6,801
Posted By prash184u
WOW ... for loop worked thank you so much...
WOW ... for loop worked

thank you so much chatwizrd

don't know why while loop did not work .. but it will do the job ... thanks again
Forum: Solaris 11-20-2008
6,801
Posted By prash184u
Check SSH Connection .. help ..
I've script where i check connection to many hosts ... it take input from HOSTLIST.txt
Ex. cat HOSTLIST.txt
host1
host2

while read HOSTNAME
do
echo $HOSTNAME
ssh -o...
1,720
Posted By prash184u
how do i ignore rows with first filed NULL
I have a file to load in the table, and am using SQLLDR
CONTROL FILE
-----------------------
LOAD DATA
INFILE 'sample.txt'
APPEND
INTO TABLE TEMP_LOAD
FIELDS TERMINATED BY '|'
TRAILING...
Showing results 1 to 25 of 36

 
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy