10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. UNIX for Dummies Questions & Answers
Can some one please explain why do we use colon in a grep statement .
for eg:
ORACLE_SID=$(grep :$(echo $JOBNAME |cut -c1-3): ${SWENV_TAB}|awk -F: '{print $1}')
Thanks in advance
Sri (5 Replies)
Discussion started by: Sri3001
5 Replies
5. UNIX for Advanced & Expert Users
Hello Folks,
i have to write shell scripting for given expected output manner.
in given input we have to write shell script in such a way that sequence no can b merged/link between start and end digit with hyphen "-" symbol and rest of digit separated by ","
Eg :
For Input "2 6 7 8 11 12... (9 Replies)
Discussion started by: panchalh
9 Replies
6. UNIX for Dummies Questions & Answers
Dear Gurus,
I have a unix file with multiple colons on each row, and I would like to replace each colon with a blank space using the awk command.
For example, I have the following data:
Data:
---------
A~000000000000518000~SLP:~99991231~20090701~00102.00~USD:~CS:~... (2 Replies)
Discussion started by: chumsky
2 Replies
7. Shell Programming and Scripting
Hi,
I have to process four source text files with possibility to contain carriage return on the particular column. Thus, i need to replace the carriage return with 3 colons <:::>
The particular column position in the source files is not fix but the name is fixed. That is, say for example,... (4 Replies)
Discussion started by: agathaeleanor
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am new for unix and I am following ABS guide. What is the purpose of - (hypen ) in the below command and What it will do in this?. Can anyone explain it in detail. Rest of the things in the below command I understood somewhat.
(cd /source/directory && tar cf - . ) | (cd /dest/directory &&... (1 Reply)
Discussion started by: gwgreen1
1 Replies
9. Shell Programming and Scripting
in one of my script..I have some thing like
john:christina : one::
and i want to make it like
john:chritina:two:(date command):jackey:
basically change 'one' to 'two' and run date :command and add other name: (30 Replies)
Discussion started by: Learnerabc
30 Replies
10. Solaris
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