Hi,
I am trying to get an ouput of certain fields from a file:
awk '{ print $NF }' portfile
8087
8047
localhost:1117
Now i need to take this output and see if it exists in netstat -a command. How do i check that.
Thanks,
Gundu (3 Replies)
Hi Friends,
Can anyone help me with comparing the records in twofiles,
I have two files (csv)
FILE1:
1023,SMITH JAMES , (203) 789-1249
1023,HARRY POTTER , (213) 789-1249
1023,JONES D, (903) 789-1249
FILE1:
1023,SMITH ,2037891249
1023,HARRY , 2137891249
1023,JONES, 7037891249
... (14 Replies)
Hi all
I have to compare maps/files on two seperate boxes and the output must be as following:
1)list the maps/file on box1
2)list the maps/file on box2
3)List maps in both the environments
a) which are same
b)which are different
pls any ideas are appreciated
thnks (2 Replies)
Hi everybody.
I have this comand "/usr/local/check_procs myprocess" which prints "OK: myprocess running" on my console if the process is running and "myprocess not running" if it is not.
I am writing a bash script to check if the process is running but am getting an error.
Here is my... (3 Replies)
Hi,
I have a variable with value tmp2=123.45.175.243, I am taking this value from a network file.
In the script I need to check whether the variable has only numerals and .(dot).
if ..." ]
then
printf "SUCCESS\n"
else
printf "FAILED\n"
fi
doesnt work, is there a alternate... (1 Reply)
Hi,
I have file like below,
Srinivas Jala Srinivas Jala AA
Srikanth ML Srikanth ML KK
Vijay Kumar Dha Vijay Kumar Dha JJ
i want to compare like "Srinivas Jala" word in same line, if i found i shoud get some like found, or not found. Pls help to get the code. (3 Replies)
Hi,
I have many files in the source directory but I need to process with the latest timestamp file.
I am using linux operating system. i want extract the file created timestamp( Ext_File_create_date=)
With this format YYYYMMDD-
i have searched the relevent command in the unix forms but did... (5 Replies)
Hi ,
Please look into the query
1)Date format: mm/dd/yyyy example (10/22/2013)
2) compare this date with the System date
3) if the difference of dates less than 30 days. Then return true otherwise false.
4)commands date-d is not there in my unix version.
5)present version 6
6)using... (7 Replies)
Hi All, Please suggest some file comparison tool in Linux.
The tool have the provision for command line option for file comparison and the output will be stored in to html file. Thanks in advance (2 Replies)
I have below code inside my awk script
if ( $0 ~ /SVC IN:/ )
{
svc_in=substr( $0,23 , 3);
if (msg_start == 1 && msg_end == 0)
{
msg_arr=$0;
}
}
else if ( $0 ~ /^SVC OUT:/ )
{
svc_out=substr( $0, 9, 3);
if (msg_start == 1 && msg_end == 0)
... (6 Replies)
Discussion started by: bhagya123
6 Replies
LEARN ABOUT DEBIAN
colors
COLORS(3) libbash colors Library Manual COLORS(3)NAME
colors -- libbash library for setting tty colors.
SYNOPSIS
colorSet <color>
colorReset
colorPrint [<indent>] <color> <text>
colorPrintN [<indent>] <color> <text>
DESCRIPTION
General
colors is a collection of functions that make it very easy to put colored text on tty.
The function list:
colorSet Sets the color of the prints to the tty to COLOR
colorReset Resets current tty color back to normal
colorPrint Prints TEXT in the color COLOR indented by INDENT (without adding a newline)
colorPrintN The same as colorPrint, but trailing newline is added
Detailed interface description follows.
Available colors:
Green
Red
Yellow
White
The color parameter is non-case-sensitive (i.e. RED, red, ReD, and all the other forms are valid and are the same as Red).
FUNCTIONS DESCRIPTIONS
colorSet <color>
Sets the current printing color to color.
colorReset
Resets current tty color back to normal.
colorPrint [<indent>] <color>
Prints text using the color color indented by indent (without adding a newline).
Parameters:
<indent>
The column to move to before start printing. This parameter is optional. If ommitted - start output from current cursor position.
<color>
The color to use.
<color>
The text to print.
colorPrintN [<indent>] <color>
The same as colorPrint, except a trailing newline is added.
EXAMPLES
Printing a green 'Hello World' with a newline:
Using colorSet:
$ colorSet green
$ echo 'Hello World'
$ colorReset
Using colorPrint:
$ colorPrint 'Hello World'; echo
Using colorPrintN:
$ colorPrintN 'Hello World'
AUTHORS
Hai Zaar <haizaar@haizaar.com>
Gil Ran <gil@ran4.net>
SEE ALSO ldbash(1), libbash(1)Linux Epoch Linux