Sponsored Content
Full Discussion: Awk display
Top Forums UNIX for Advanced & Expert Users Awk display Post 302316416 by shahnazurs on Friday 15th of May 2009 02:56:27 AM
Old 05-15-2009
Awk display

Hi All,

I got a script like

Code:
#!/bin/ksh
echo "Welcome Sir"|awk '
{
      print $1
}'

This is printing Welcome. I want output like 'Welcome' enclosing by single quotes.

Please assist me.

Thanks,
Shahnaz.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using awk make an field as 5 digit and display

using awk convert 3 rd fileld of file as 5 digit and then display changed file. like 1 2 23445 3452 3343 3 5 6 6 ================ o/p:- 1 2 23445 3452 03343 3 5 00006 6 (1 Reply)
Discussion started by: RahulJoshi
1 Replies

2. Shell Programming and Scripting

awk help..string display

Dear All I had input file as mention below. <RXMFP:MO=RXOTX-46-5; RADIO X-CEIVER ADMINISTRATION MANAGED OBJECT FAULT INFORMATION MO BTSSWVER RXOTX-46-5 ERA-G04-R11-V01 RU RUREVISION RUSERIALNO 0 RUPOSITION ... (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies

3. Shell Programming and Scripting

syslog grep/awk/sed display

What i am trying to do is pull all the "fail" and "error" from the HP-UX syslog except if it includes "sshd" or "ftpd" and IF the next line says "above message repeats NN time" display the next line. Got some of it working with someones help with sed but Im more familiare with awk. Trying... (4 Replies)
Discussion started by: Ikon
4 Replies

4. Shell Programming and Scripting

awk & display on one line

awk '/description/ || /instances/ {print;getline;print}' rtprod2.scp This command gives me something like below. description=OpsExec_Clinical instances=0 description=OpsExec_Pharmacy instances=1 description= instances=0 description= instances=0 description= description=OP_MVOR_ORU_OUT... (9 Replies)
Discussion started by: Daniel Gate
9 Replies

5. Shell Programming and Scripting

a little help with using AWK to display whats being read in

I am making a script that reads in the model of a car and then searches a file and displays the make model and price of anything matching the input provided. here is what I have so far #!/bin/sh echo Please enter a car model: read model if test $? -eq 0 then grep $model /home/cars awk... (4 Replies)
Discussion started by: subway69
4 Replies

6. Shell Programming and Scripting

how to display some special results with AWK

I have a file like this: AAEQGAGNQPQH,,,,160,32,,,, AAGQDYNSPLH,,712,39,,,,,, AAGREGGNTEAF,26,,,,,,,,4 AAGSPQH,,,,8,5,,,, AAKKLGQFYNEQF,4,,6,,,7,,,2 AANSGGRYNEQF,,2747,3120,,,,,, AAQGGVGGELF,,,,5,,12,36,, AAQGLAGYYEQY,,25,13,,,,,, AAQRGNEQF,510,2,,,6,,6,,76 AAQTGENSPLH,,16,16,,,,,, The... (9 Replies)
Discussion started by: xshang
9 Replies

7. Shell Programming and Scripting

Awk to display lines that contain a period only in the first column

I've been trying to figure this out for quite a bit... I'm trying to check the first column for a period and only display the line if it contains a period. Below is a sample of the data i'm working with. www.homestorest 7200 IN CNAME www.homestorest.fishing.net.shopit.net.... (6 Replies)
Discussion started by: spartan22
6 Replies

8. Shell Programming and Scripting

Grep awk sed display value

Hello all, I wget a file and i tried to display some value : content=$(wget IP:9005/GlobalStatistics -q -O -) echo onlineusers $content > /home/active_session_log #cat active_session_log {"ActiveSessionCount":0,"ActiveGameCount":0,"QueueMatchMakingPlayerCount":0} My goal is write... (7 Replies)
Discussion started by: acidozik
7 Replies

9. Shell Programming and Scripting

Display the file name on each line using awk

How do I display the filename that has been awk to each of the line in Unix, i need to so far I have tried {print FILENAME;nextfile} but to no avail. `awk -F, '/1.2 Install TCP Wrappers/ {P=0} /1.1 Apply latest OS patches/ {P=1} P' solarisappsummary.txt solarisdbsummary.txt` For... (6 Replies)
Discussion started by: alvinoo
6 Replies

10. Shell Programming and Scripting

awk command to display particular pattern

Hi I am using awk to print 10,11 column but it is not displaying required output. Please let me know how I can browse through the line and extract the required one Example: I have below 2 lines in file seq 49960| Thu Apr 19 10:57:40.726182 2018|Len: 89|GAP for CL/U18 9P-NC (CL90U8)) gap... (10 Replies)
Discussion started by: sdosanjh
10 Replies
bup-margin(1)						      General Commands Manual						     bup-margin(1)

NAME
bup-margin - figure out your deduplication safety margin SYNOPSIS
bup margin [options...] DESCRIPTION
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids. For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by its first 46 bits. The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits, that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits with far fewer objects. If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if you're getting dangerously close to 160 bits. OPTIONS
--predict Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer from the guess. This is potentially useful for tuning an interpolation search algorithm. --ignore-midx don't use .midx files, use only .idx files. This is only really useful when used with --predict. EXAMPLE
$ bup margin Reading indexes: 100.00% (1612581/1612581), done. 40 40 matching prefix bits 1.94 bits per doubling 120 bits (61.86 doublings) remaining 4.19338e+18 times larger is possible Everyone on earth could have 625878182 data sets like yours, all in one repository, and we would expect 1 object collision. $ bup margin --predict PackIdxList: using 1 index. Reading indexes: 100.00% (1612581/1612581), done. 915 of 1612581 (0.057%) SEE ALSO
bup-midx(1), bup-save(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-margin(1)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy