Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Why do we use a colon (:) in grep? Post 302592468 by Sri3001 on Tuesday 24th of January 2012 03:09:58 AM
Old 01-24-2012
Why do we use a colon (:) in grep?

Can some one please explain why do we use colon in a grep statement .
for eg:
Code:
ORACLE_SID=$(grep :$(echo $JOBNAME |cut -c1-3): ${SWENV_TAB}|awk -F: '{print $1}')


Thanks in advance
Sri

Last edited by Franklin52; 01-24-2012 at 11:14 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. Solaris

how to delimit a colon

I want to know how to delimit a colon in a file name while scp ing from one host to other host. I used forward slash(\) but that is not working. (1 Reply)
Discussion started by: rogerben
1 Replies

2. Shell Programming and Scripting

Remove char after Colon

Hi guys, This is my input 2735:<7001> 34 789 701 2 2774:<7001> 34 789 701 2 How to delete characters after colon : Including colon : too ? My output should... (3 Replies)
Discussion started by: gowrishankar05
3 Replies

3. Shell Programming and Scripting

Script required to put colon

Hi Expert, I need help on script to put colon between two characters. From this line 60060160B18414009C557D9DE02CDF11 to this 60:06:01:60:B1:84:14:00:9C:55:7D:9D:E0:2C:DF:11 Any way to make it on script. (2 Replies)
Discussion started by: ranjancom2000
2 Replies

4. Shell Programming and Scripting

Sort numbers which has colon (:) in between

Although i tried multiple option i couldn't find a way to get the rigt ouput. Say i have the following data cat file.txt C request C response C request C response The output should look like (9 Replies)
Discussion started by: varu0612
9 Replies

5. Shell Programming and Scripting

Bash, remove numbers after colon

Hello All, I was wondering if someone might know how to do this. I have a word list that is format like the example below. I need to take away the :number after that... is there some kind of command I could use to remove them? 123456:5562 password:1507 123456789:989 qwerty:877... (7 Replies)
Discussion started by: 3therk1ll
7 Replies

6. Shell Programming and Scripting

How to replace colon in HH:MI:SS to hypen?

I have a file that contains timestamp in some of the rows in the file and the field separator is colon and some of the rows have numerical values, timestamp and characters with colon as the field separator We are looking to change colon in HH:MI:SS for the timestamp to hyphen “-“ leaving the field... (1 Reply)
Discussion started by: cumeh1624
1 Replies

7. Shell Programming and Scripting

Use of colon

There was a sample code on forum I found sometime back: $ f() { local foo=; : ${foo=unset}; declare -p foo; }; f declare -- foo="" $ f() { local foo; : ${foo=unset}; declare -p foo; }; f declare -- foo="unset" Can someone explain why was colon (:) is being used here. Whats its use? (4 Replies)
Discussion started by: Rameshck
4 Replies

8. Shell Programming and Scripting

Print after colon

I have entries like below in a file 11.22.33.44:80 22.33.44.55:81 :::587 :::465 What I need is to take out the part after colon ( : ) Output should be as follows. 80 81 587 465 I used cut -d: -f 2 but its not working as dedired. (2 Replies)
Discussion started by: anil510
2 Replies

9. UNIX for Dummies Questions & Answers

awk colon separated items

Hi, I need to filter my data based on items in column 23. Column 1 until column 23 are tab separated. This is how column 23 looks like: PRIMARY=<0/1:504:499,5:.:.:.:0.01:1:15:.> I want to extract lines if items 7 (separated by : ) in column 23 are more than 0.25 . In example above , item... (2 Replies)
Discussion started by: janshamsani
2 Replies

10. UNIX for Beginners Questions & Answers

How to print string after colon?

Hi How do I print character after colon":" below is input file BUC1 : 33157147, BUC1 COUNT : 478455,BUC1 : 9930334.18 BUC2 : 1203100,BUC2 COUNT : 318678,BUC2 GIVEN : 3493491.59 BUC3 : 234567.99 expected output 33157147 478455 9930334.18 12031002 318678 3493491.59 234567.99 (10 Replies)
Discussion started by: scriptor
10 Replies
GRUB-RENDER-LABEL(1)                                               User Commands                                              GRUB-RENDER-LABEL(1)

NAME
grub-render-label - generate a .disk_label for Apple Macs. SYNOPSIS
grub-render-label [OPTION...] [OPTIONS] DESCRIPTION
Render Apple .disk_label. -b, --bgcolor=COLOR use COLOR for background -c, --color=COLOR use COLOR for text -f, --font=FILE use FILE as font (PF2). -i, --input=FILE read text from FILE. -o, --output=FILE set output filename. Default is STDOUT -t, --text=STRING set the label to render -v, --verbose print verbose messages. -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. REPORTING BUGS
Report bugs to <bug-grub@gnu.org>. SEE ALSO
The full documentation for grub-render-label is maintained as a Texinfo manual. If the info and grub-render-label programs are properly installed at your site, the command info grub-render-label should give you access to the complete manual. grub-render-label (GRUB) 2.02-2ubuntu8.3 July 2018 GRUB-RENDER-LABEL(1)
All times are GMT -4. The time now is 04:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy