Search Results

Search: Posts Made By: The Observer
3,146
Posted By The Observer
Sorry slant-40, but I want to do all this in a...
Sorry slant-40, but I want to do all this in a Shell script & not in a C Program.
Also, I am trying to find the character preceding 'GS' to find the segment delimiter in that file as in our system...
3,146
Posted By The Observer
To find a character immediately following a specified String
Hello,

I have a UNIX file in which data is like this --

ISA*00* *00* *01*006415160 *01*137361242 ...
2,017
Posted By The Observer
I did not get ur solution, Tytalus. 'sed' is...
I did not get ur solution, Tytalus.

'sed' is used for replacinone str with another. I want to find the first occurance of UNB, UNH or UNOA and store the corresponding characters in different...
2,017
Posted By The Observer
To find a character immediately following a word
Hello,

I have data in one file like -

UNB+UNOA:1+006415160:1+WF0000010188:ZZ+080701:0600+2++DELFOR++++T'UNH+2+DELFOR:D:97A:UN................

Now, I want to find what is the character...
4,459
Posted By The Observer
Problems with delimiters
Hello,

I have data in a file something like this -

UNB+UNOA:1+006415160:1+AR0000012360:ZZ+080701:0552+2++DELFOR++++T'UNH+2+DELFOR:D:97A:UN

Here, the delimiters used are + , : and ' . I have...
3,434
Posted By The Observer
Can you please elaborete further ? My...
Can you please elaborete further ?

My requirement is like - if I find the string "PLANT" in one of the parameters which is coming in the format as - PLANT,<value> then I should take the <value> (...
3,434
Posted By The Observer
Accessing the parameters of a shell script
Hi,

I have one situation. I am developing a shell script to which parameters will be passed from a Web based User Interface using some Business Process(BP).There are some 6 parameters for which...
8,528
Posted By The Observer
Thank u very much. Using nawk or...
Thank u very much.

Using nawk or /usr/xpg4/bin/awk works perfectly fine without making any change in the original code.

Thanks a lot again.
8,528
Posted By The Observer
ls -1 | wc -l | read count awk -v...
ls -1 | wc -l | read count

awk -v count=$count '{a[$0]++} END{for (i in a) if (a[i]==count) print i}'
awk: syntax error near line 1
awk: bailing out near line 1


I am getting this error. Not...
8,528
Posted By The Observer
But ....
Thanks ripat, it's perfectly working fine. But ,I have a little concern.
Actually, I won't be sure how many no. of files will get generated everytime the script runs. So, I will be storing the no....
8,528
Posted By The Observer
Sorry Sir, My requirement is I want the lines...
Sorry Sir,
My requirement is I want the lines which are present in all these 'n' files. Means every line which will come in output must be present in each of these 'n' files.

Please guide.
8,528
Posted By The Observer
To find all common lines from 'n' no. of files
Hi,

I have one situation. I have some 6-7 no. of files in one directory & I have to extract all the lines which exist in all these files. means I need to extract all common lines from all these...
98,056
Posted By The Observer
Subtracting an Integer from a Variable
Hello,

I am in following situation.-

COUNT=`ls -l | wc -l`
echo $COUNT
---> 26
NO_OF_FILES=$COUNT-1
echo $NO_OF_FILES
---> 26-1

Here, I want the output to be 25. How could I do this....
4,066
Posted By The Observer
I tried but it is not working. I did like...
I tried but it is not working.

I did like this -

sed 's/CONTACT SYSTEMS! Some payments have been rejected/\<B\>\<font color="red" size="5.0pt"\>CONTACT SYSTEMS! Some payments have been...
4,066
Posted By The Observer
Problem with 'sed' command while using HTML tags
Hello,

I am using sed as follows -

sed 's/CONTACT SYSTEMS! Some payments have been rejected/<B><font color="red" size="5.0pt"CONTACT SYSTEMS! Some payments have been rejected</font></B>/'...
3,065
Posted By The Observer
Problem in For Loop
Hi,
While executing for loop in a shell script , I am getting error.

for i in `cat FILE`
> do
> if [ `cat $i | tr " ' " "\n" | grep ^UNB | cut -f3 -d+ | cut -f1 -d:` -eq WF0000010001 ]; then...
12,349
Posted By The Observer
Thanks Yogesh. It worked fine.
Thanks Yogesh. It worked fine.
12,349
Posted By The Observer
Replacing end of line with " in a UNIX file
How should I replace End of line Character by ".
i.e in a file -
Name1,NO1
Name2,No2
Name3,No3
....

Should look like --
Name1,NO1"
Name2,No2"
Name3,No3"
....
Showing results 1 to 18 of 18

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