Search Results

Search: Posts Made By: Raza Ali
601
Posted By Raza Ali
Thank you Vgersh. All these are small test. ...
Thank you Vgersh.

All these are small test.


[alepo@a2e-rep-db tmp]$ cat abc.txt
A1,df -kh|head -2
[alepo@a2e-rep-db tmp]$

[alepo@a2e-rep-db tmp]$ cat test55.sh
#!/bin/bash
IFS=$'\n'...
601
Posted By Raza Ali
Hi Jake, It gives another error. ...
Hi Jake,

It gives another error.


[alepo@a2e-rep-db tmp]$ cat test55.sh
#!/bin/bash
a="df -kh\|head -2"
echo "$a"
$a
[alepo@a2e-rep-db tmp]$
[alepo@a2e-rep-db tmp]$ sh test55.sh
df...
601
Posted By Raza Ali
UNIX: Executing command using variable
Hi All,

I have one big script to execute multiple commands based on some condition and log the process.

I am not able to use | there, it is giving below error - refer code: it is small example....
1,158
Posted By Raza Ali
Hi RudiC, Thank you for reverting. Pls...
Hi RudiC,

Thank you for reverting.

Pls show how and where "SERVER-B ... will delete same".: either delete OR move to another directory.

Will all files 1 - 4 be deleted from server1 if all...
1,158
Posted By Raza Ali
File Management: Removing of files from Server2 IF the same file is removed from Server1.
Hi Folks,

I have a requirement of file management on different servers.

Source Server is SERVER-A.

Two servers will fetch files from SERVER-A: SERVER1 and SERVER2.

4th SERVER is SERVER-B,...
407
Posted By Raza Ali
Thank you for quick response. I tried...
Thank you for quick response.

I tried this(added ( before i in a).


awk '{a[$1]=($1 in a)?a[$1] OFS $2:$2} END {for (i in a) print i,a[i]}'
407
Posted By Raza Ali
Using awk to print output based on first field.
Hi Folks,

I have one requirement, There is one file, which contains two fields.

Based on first field, I need to print an output.

Example will be more suitable.

Input file like this.

...
1,352
Posted By Raza Ali
Hi Rudi, Thank you for quick response. ...
Hi Rudi,

Thank you for quick response.

Date in the log file is constant, So it won't be an issue.

Regards,
Raza Ali
1,352
Posted By Raza Ali
Calculate Time diff in milli milliseconds(Time format : HH:MM:SS,NNN)
Hi All,

I have one file which contains time for request and response.

I want to calculate time difference in milliseconds for each line.

This file can contain 10K lines.

Sample file with...
486
Posted By Raza Ali
Hi Rudi, Thank you for providing the...
Hi Rudi,

Thank you for providing the solution.

Regards,
Raza Ali
486
Posted By Raza Ali
Hi Rudi, Thank you for response. I...
Hi Rudi,

Thank you for response.

I understand that it can be done with array, but not able to use logic with same.
Column 2 will not contain any negative value, in fact it will be always...
486
Posted By Raza Ali
Need help in awk: running a loop with one column and segregate data 4 each uniq value in that field
Hi All,

I have a file like this(having 2 column).

Column 1: like a,b,c....
Column 2: having numbers.

I want to segregate those numbers based on column 1.

Example:

file.

a 5
b 9
b...
1,468
Posted By Raza Ali
Want to sort a file which contains alphanumeric strings
I want to sort a file which contains alphanumeric string.


bash-3.00$ cat abc
mtng1so
mtng2so
mtng11so
mtng9so
mtng23so
mtng7so
hstg2so
hstg9so
hstg1so
hstg11so
hstg13so
bash-3.00$...
908
Posted By Raza Ali
Thnaks for reply Skrynesaver. Issue still...
Thnaks for reply Skrynesaver.

Issue still not resolved, As after firing this script it asks for username and password.
Which is not appearing on screen.
I checked d1d1 file it was asking for...
908
Posted By Raza Ali
Want to remove telnet error/info from screen
Hi Team,

I am using one script, It is working fine, the problem is it gives unwanted telnet errors when I am using it.
I just want to remove these unwanted errors/info from my screen.

...
993
Posted By Raza Ali
Telnet errors coming on screen while using snarf command.
Hi Team,

I am using one script, It is working fine, the problem is it gives unwanted telnet errors when I am using it.
I just want to remove these unwanted errors/info from my screen.

...
671
Posted By Raza Ali
Thanks a lot.
Thanks a lot.
671
Posted By Raza Ali
Script to read command line input and change it to some form
Hi,

I want to write a small code in which script changes command line input to some form.
Example


script.sh a1 a2 a3 a4 .....

output should be "a1|a2|a3|....."

Number of inputs in...
603
Posted By Raza Ali
Hi rdrtx1, Thanks for reply, Code is...
Hi rdrtx1,

Thanks for reply,

Code is giving syntax error.
One more Point I want to remove this " Date: 2013/07/16 17:51:35 GMT"

In which "Date: GMT" space...
603
Posted By Raza Ali
Matching some string in a line and removing that
I have one output file.

Node: hstg1so Date: 2013/07/16 17:51:24 GMT
Totals: 10608 6871 0 2208 1529 0 0 64% 0% (...
683
Posted By Raza Ali
Hi Don Cragun, Thanks for your reply. My...
Hi Don Cragun,

Thanks for your reply.
My issue is resolved/


bash-3.2$ cat raza
#!/usr/bin/bash
Input="$1"
echo "$Input"
if [[ $Input =~ ^[0-9]{1,3}-[0-9]{1,3}-[0-9]{1,3}$ ]]
then
echo...
1,008
Posted By Raza Ali
bash-3.2$ cat raza #!/usr/bin/bash Input="$1"...
bash-3.2$ cat raza
#!/usr/bin/bash
Input="$1"
echo "$Input"
if [[ "$Input"="[0-9]+-[0-9]+-[0-9]+" ]];
then
echo "HELLO"
PC=`echo "$Input" |sed -e 's/^[0]*//g'|sed -e's/-[0]*/-/g'`
grep -hw...
1,008
Posted By Raza Ali
Hi Gacanepa. Thanks for reply, little...
Hi Gacanepa.

Thanks for reply, little improvement required numbers can be 1 to 3 it's not 3x-2y-2z

I tried something, but not able to match correctly.

bash-3.2$ cat raza
#!/usr/bin/bash...
683
Posted By Raza Ali
[Solved] How to match xyz-mno-prq in shell script?
I want to match variable with Point codes.
$Input == xyz-mno-pqr

x,y,z,m,n,o,p,q,r are numbers from 0 to 9.

It may or may not be there

eg

207-89-67

027-089-067

207-9-7

25-98-1
...
1,008
Posted By Raza Ali
Hi gacanepa, Input to the script can be...
Hi gacanepa,

Input to the script can be PointCode or word.

./abc 209-57-73

./abc tcm

./abc SHOKCA0

I want script to identify $1 that command line input and do operation based on that....
Showing results 1 to 25 of 29

 

Featured Tech Videos

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