Search Results

Search: Posts Made By: kieranfoley
Forum: Web Development 12-09-2017
19,803
Posted By kieranfoley
Thanks jgt. I get what you are saying. It...
Thanks jgt. I get what you are saying. It definitely has something to do with how my apache webserver communicates with seieadpa01. I will investigate this.

---------- Post updated at 08:02 AM...
Forum: Web Development 12-08-2017
19,803
Posted By kieranfoley
This is the error in the apache log when I run...
This is the error in the apache log when I run curl in verbose. curl -vvv (note: the IP address is correct for seieadpa01)

* About to connect() to seieadpa01 port 9004 (#0)
* Trying...
Forum: Web Development 12-08-2017
19,803
Posted By kieranfoley
I actually had that in there earlier and it does...
I actually had that in there earlier and it does write to that file with the hostname. the hostname I have been using for testing is seiemccli01

This is the file entry after I run (172.16.117.145...
Forum: Web Development 12-08-2017
19,803
Posted By kieranfoley
This the bash script (dpa_report.sh) that creates...
This the bash script (dpa_report.sh) that creates the REST -API report. I have taken out the actual username and password for the purposes of this post. If I run this script from the command line and...
Forum: Web Development 12-08-2017
19,803
Posted By kieranfoley
Thank jgt That fixed that particular problem. Now...
Thank jgt That fixed that particular problem. Now I am getting a curl error though. If I run the curl from the command line I have no issue but when it is called from the php script which calls the...
Forum: Web Development 12-08-2017
19,803
Posted By kieranfoley
Passing variable from PHP to bash script
I am totally new to PHP and I am trying to create a script that will as a user for a hostname and then use the "hostname" variable to generate a report using REST API.

I am able to create the...
7,672
Posted By kieranfoley
Thanks rbatte1. I tried setting the LINK variable...
Thanks rbatte1. I tried setting the LINK variable as you suggested and I am still getting the same 503 http error. This is what my script looks like now.

#!/bin/bash

export...
7,672
Posted By kieranfoley
Hi Robin, this is the output from the...
Hi Robin,

this is the output from the commands you asked me to run.

[root@seiemccli01 REST_API]# uname -a
Linux seiemccli01 2.6.39-400.215.10.el5uek #1 SMP Tue Sep 9 22:51:46 PDT 2014 x86_64...
7,672
Posted By kieranfoley
Hi RudiC, I'm not sure what you mean? The...
Hi RudiC,

I'm not sure what you mean? The LINK variable is defined from this line in the script.

LINK=`cat $TEMP_DIR/test_xml.out | grep link | sed 's/<link>//g;s/<\/link>//g'| awk '{sub(/^[...
7,672
Posted By kieranfoley
Curl/http 503 error with bash script
I am trying to use REST API and curl in a bash script to generate a http report. The curl command at the end of the script should generate a html file but instead I get an error "HTTP/1.1 503 Service...
1,029
Posted By kieranfoley
Awk/if statement error
Can anybody tell the correct way to use the following awk pattern check within an if statement?

When I run this command outside of the if statement

cat /tmp/test2.out | awk -v T=$TIME -v...
4,429
Posted By kieranfoley
Looking for good book on awk
I am not sure if I am posting to the right forum but I would like to buy a book which goes into Awk in detail and covers the most advanced Awk programming techniques. Would anybody be able to...
1,203
Posted By kieranfoley
There are 2445 entries in file 1 and 2431 entries...
There are 2445 entries in file 1 and 2431 entries in file 2. File 1 is 264KB and file 2 is 352 KB. file 2 has a lot more columns.

The pattern in column 3 in file 1 can exist in several lines in...
1,203
Posted By kieranfoley
Match pattern from file 1 with any/all columns in file 2
Hi, I have been looking everywhere for an example so I can try and do this myself but I am having difficulty. I have 2 large files of different sizes and if the pattern in the 3rd column in file 1 is...
1,825
Posted By kieranfoley
Also, this is printing out the lines twice when...
Also, this is printing out the lines twice when matches occur

awk -F, 'FNR==NR{A[$2]=$1;next} ($8 in A){$9=A[$8];print $0} !($8 in A){print $0}' OFS=, file2 file1

Do you know why that is?
...
1,825
Posted By kieranfoley
Hi thanks! That works great but I should have...
Hi thanks! That works great but I should have said that file 1 can have more that 9 columns. For example this
...
1,825
Posted By kieranfoley
Match column 8 in file 1 with column 2 in file 2 and replace..
I am looking at the NR==FNR posts and trying to use them to achieve the following but I am not getting it.
I have 2 files. I want to match column 8 in file 1 with column 2 in file 2. When they match...
1,394
Posted By kieranfoley
Printing multiple lines on the same line between specific text
This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port.

fc2/12 is up
Port description is...
2,645
Posted By kieranfoley
Yes thanks for cleaning up the greps. I have also...
Yes thanks for cleaning up the greps. I have also cleaned up the sed substitutions somebit. The reason I have ended up with so many steps is because I have been doing this bit by bit. I run an awk...
2,645
Posted By kieranfoley
Hi rbatte1 thank you for your reply. No...
Hi rbatte1 thank you for your reply.

No this is not homework. I use awk/sed/grep scripts on occasion and at times I get caught in a rut when more complex scripting is required. For this...
2,645
Posted By kieranfoley
Using awk to reformat file output
Hi there. I need to reformat a large file. Here is a sample of the file.


NETIK0102_UCS_Boot_a,NETIK0102_UCS_Boot_b
5200 2438 70G
5200 2439 70G...
1,212
Posted By kieranfoley
Thanks it almost works. But is there a way to use...
Thanks it almost works. But is there a way to use ~ instead of = ? So this way it will swap all the occurences of NETIK0102_UCS_BOOT, and NETIK0102_UCS_HBA0 etc? If it matches any of the word...
1,212
Posted By kieranfoley
Replace text from one file in another file
I have 2 files. Here is a sample from file 1.

NETIK0102_UCS_Boot 20000025b510105d
NETIK0102_UCS_Boot 20000025b510104d
NETIK0102_UCS_HBA0 20000025b510113e
NETIK0102_UCS_HBA1 20000025b510112e...
3,875
Posted By kieranfoley
Thanks for that. it works great!
Thanks for that. it works great!
3,875
Posted By kieranfoley
How to search, replace and multiply variable within awk?
I have a file that reports the size of disks GB's or TB's - I need the file to report everything in MB's. Here is an extract of the file - the last column is the disk size.


19BC 2363 20G
1AA3...
Showing results 1 to 25 of 47

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