Search Results

Search: Posts Made By: ahamed101
2,084
Posted By ahamed101
You didnt answer my 2nd and 3rd question...
You didnt answer my 2nd and 3rd question correctly.

2. From where would I get the name "Laptop-Fred"?

3. Does the mac X1:X2:3X:X4:X5:Y6 corresponds to 192.168.0.10?

--ahamed
2,084
Posted By ahamed101
Where do you get the string "Laptop-Fred"? And...
Where do you get the string "Laptop-Fred"?
And do you want to extract the IP from the output of nmap?
Does the mac X1:X2:3X:X4:X5:Y6 corresponds to 192.168.0.10?

--ahamed
800
Posted By ahamed101
find . -type f \( -name '*.jpeg' -o -name '*.gif'...
find . -type f \( -name '*.jpeg' -o -name '*.gif' -o -name '*.bmp' -o -name '*.tiff' -o -name '*.png' \) -exec mogrify -format jpg {} \; -delete


--ahamed
2,105
Posted By ahamed101
We need to see your script. How is the value from...
We need to see your script. How is the value from first file 4300 23456 and second file 4300 3459 ending up as 4300 233445569?
1,482
Posted By ahamed101
Why is the third record different? There is only...
Why is the third record different? There is only one |

---------- Post updated at 11:47 AM ---------- Previous update was at 11:44 AM ----------

Try this
awk '{x=$1" "$2"|"$3"|"$4"|";...
1,482
Posted By ahamed101
Your output is not consistent! Please double...
Your output is not consistent! Please double check.
2,105
Posted By ahamed101
You mean you want to change 233445569 to this...
You mean you want to change 233445569 to this 234569? and not the records but the repeated values in the fields?
1,048
Posted By ahamed101
For any column to be empty, there are 3 cases ...
For any column to be empty, there are 3 cases
1. | being the first character - indicating the first field is missing ^|
2. | being the last character - indicating the last field is missing |$
3....
1,789
Posted By ahamed101
That is not how it works. As Don mentioned,...
That is not how it works.
As Don mentioned, BEGIN statements are primarily used for initialization or things of that sort. It gets called before the file is parsed.

What is your actual purpose?
2,828
Posted By ahamed101
Try this #!/usr/bin/python import time; ...
Try this
#!/usr/bin/python
import time;

cmp=time.time()-(24*60*60)
file = open("error.logs", "r")
for line in file:
log=time.mktime(time.strptime(line.rstrip().split(',')[0], '%d %b %Y...
2,828
Posted By ahamed101
log_time=$( date +%s -d "$data" ) is the line...
log_time=$( date +%s -d "$data" ) is the line causing the problem. AIX doesn't have -d option.
5,171
Posted By ahamed101
It depends on which memory you are interested in....
It depends on which memory you are interested in.
Below is the code to get the memory used by processes for all the users in the system - grouped.
top -n1 -b | awk '/PID/{p=1;next} p{user[$2]+=$10}...
2,828
Posted By ahamed101
Well, as per the man page of aix, date should...
Well, as per the man page of aix, date should support this, may be some version difference. I dont have a aix box to test now. Hope you are executing the correct code. So date +"%s" also gives you...
2,828
Posted By ahamed101
Try the change in post # 13 then. ----------...
Try the change in post # 13 then.

---------- Post updated at 01:59 AM ---------- Previous update was at 01:57 AM ----------

#!/bin/bash

cur=$( date +%s )
(( cmp=cur-(24*60*60) ))

while...
1,789
Posted By ahamed101
Sorry I didn't quite understand what you meant.
Sorry I didn't quite understand what you meant.
2,828
Posted By ahamed101
Which is your OS? Check if your date supports +%s...
Which is your OS? Check if your date supports +%s option i.e. date +%s
Try changing the first line to if your date supports +%s
cur=$( date +%s )
(( cmp=cur-(24*60*60) ))
2,828
Posted By ahamed101
Using GNU date #!/bin/bash cmp=$( date...
Using GNU date

#!/bin/bash

cmp=$( date +%s -d"1 day ago" )
while IFS=, read data rest
do
log_time=$( date +%s -d "$data" )
[[ $log_time -ge $cmp ]] && echo "$data,$rest"
done <...
2,828
Posted By ahamed101
How does your logging start with? say at the...
How does your logging start with? say at the start of the day. Do you have a date field or something similar?
1,789
Posted By ahamed101
You corrected awk statement awk 'BEGIN{...
You corrected awk statement

awk 'BEGIN{ X["Jan"] = "01"; X["Feb"] = "02"; X["Mar"] = "03"; X["Apr"] = "04";
X["May"] = "05"; X["Jun"] = "06"; X["Jul"] = "07"; X["Aug"] = "08";
...
2,828
Posted By ahamed101
find is not that intelligent. It will only list...
find is not that intelligent. It will only list the file that was modified x no of days as per your command.
Are you expecting it to display the content which got added into that file in last 24...
2,828
Posted By ahamed101
Elaborate what you mean by "doesn't give the...
Elaborate what you mean by "doesn't give the proper output"
1,048
Posted By ahamed101
sed -n '/^|\||$\|||/=' infile
sed -n '/^|\||$\|||/=' infile
4,467
Posted By ahamed101
Try df -k | awk '$4+0>50{print $1,...
Try

df -k | awk '$4+0>50{print $1, "\t"$4,"\t" $7}'
2,480
Posted By ahamed101
Use -e with the echo in the above code as in echo...
Use -e with the echo in the above code as in echo -e "$output"

Or another approach

#!/bin/bash

read -p "Please enter a name : " name
awk -F":" '
BEGIN{ fmt="%20s%20s\n" }
function...
2,480
Posted By ahamed101
This is not right. Did you try the code which I...
This is not right. Did you try the code which I gave to see if it works for you without integrating it to your script?
I think what you are trying to do here is, get a input and display the details...
Showing results 1 to 25 of 500

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