Sponsored Content
Top Forums UNIX for Dummies Questions & Answers This awk should work, shouldn't it? Post 302956203 by Akshay Hegde on Monday 28th of September 2015 08:02:37 AM
Old 09-28-2015
Quote:
Originally Posted by sea
No change, still just a zero.

Even tried with:
Code:
awk -v IFS=" "  '{$1=$1}END{print $2}' out.tmp

As well, just a 0.

Might it be a curl issue?
Code:
0 tui # curl https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.2.1.tar.xz -o out.tar.xz 2&>out.tmp 
^C
130 tui # cat out.tmp 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  5 81.5M    5 4749k    0     0  1047k      0  0:01:19  0:00:04  0:01:15 1047k

0 tui # awk -v IFS=" "  '{$1=$1}END{print $2}' out.tmp
0

Thank you
I think you are confused, if you are using IFS for setting field separator, then there will be no effect use FS instead or -F command line argument
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

why is this so hard when it shouldn't be?

All I ask is one thing: 1. Where can i dl unix and the driver for my modem? right now i have win xp HP notebook, and bellsouth is my provider with a westell modem. (2 Replies)
Discussion started by: velious
2 Replies

2. Shell Programming and Scripting

why awk does not work here?

I am trying to find any line with the 9th column's number greater than 200, but why the following awk command does not work? awk '$9 > 200' /tmp/test 2007-09-05 10:13:05.714 640.847 any 1.2.3.4 719 2445 487260 32 6082 199 2007-09-05 10:13:02.686 641.827... (2 Replies)
Discussion started by: fedora
2 Replies

3. Shell Programming and Scripting

awk: assign variable with -v didn't work in awk filter

I want to filter 2nd column = 2 using awk $ cat t 1 2 2 4 $ VAR=2 #variable worked in print $ cat t | awk -v ID=$VAR ' { print ID}' 2 2 # but variable didn't work in awk filter $ cat t | awk -v ID=$VAR '$2~/ID/ { print $0}' (2 Replies)
Discussion started by: honglus
2 Replies

4. Shell Programming and Scripting

Parse file using awk and work in awk output

hi guys, i want to parse a file using public function, the file contain raw data in the below format i want to get the output like this to load it to Oracle DB MARWA1,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00 MARWA2,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00 this the file raw format: Number of... (6 Replies)
Discussion started by: dagigg
6 Replies

5. Shell Programming and Scripting

Delimited data contains line feeds where they shouldn't be

I have some data, each record (line) ends with a line feed (\n). Each field is pipe (|) delimited. 1|short desc|long text|2001-01-01 01:01 2|short desc| long text |2002-02-02 02:02 3|short desc| long text | 2003-03-03 03:03 4|short desc | long text | 2004-04-04 04:04 ... (10 Replies)
Discussion started by: ericdp63
10 Replies

6. Solaris

Particular user account shouldn't be locked after entering wrong passwd specfic no. times

Hi all In my system we have implemented user lockout feature after 3 failure attempt if he tries to login directly or if he run the any command through sudo and enter wrong password thrice. Now I have requirement in which particular user account shouldn't be locked when he run the command... (1 Reply)
Discussion started by: sb200
1 Replies

7. Shell Programming and Scripting

Script outputing out numbers when it shouldn't

i suspect the issue is with the IFS part. I have a script that reads a file. the problem here is that, when i run the script, it outputs a bunch of numbers. i know what these numbers are, but i dont understand why they're being sent to the screen. as you can see below, everything should be... (5 Replies)
Discussion started by: SkySmart
5 Replies

8. UNIX for Dummies Questions & Answers

Users of own group shouldn't be able to delete

Oracle Linux 6.5 oracle user's primary group is oinstall and its secondary group is dba,asmdba,asmoper. For the below created directory, I want the users belonging to dba,asmdba,asmoper to be able create, read and execute files but not delete them. How can I achieve that. If I use 775 as... (5 Replies)
Discussion started by: kraljic
5 Replies

9. Shell Programming and Scripting

Why does this if match although it shouldn't?

Hi everyboy, I am a little confused and can't understand why I get a positive match in the following case. Shell Script section echo $SHELL echo "Server type = ${SERV_TYPE}" if ]]; then echo "foor" echo -e $(_date) "${cinfo}INFO: ${crst}Checking SAP memory on ${HOST}"This is the... (1 Reply)
Discussion started by: h1kelds
1 Replies
UUIDD(8)						       System Administration							  UUIDD(8)

NAME
uuidd - UUID generation daemon SYNOPSIS
uuidd [options] DESCRIPTION
The uuidd daemon is used by the UUID library to generate universally unique identifiers (UUIDs), especially time-based UUIDs, in a secure and guaranteed-unique fashion, even in the face of large numbers of threads running on different CPUs trying to grab UUIDs. OPTIONS
-d, --debug Run uuidd in debugging mode. This prevents uuidd from running as a daemon. -F, --no-fork Do not daemonize using a double-fork. -k, --kill If currently a uuidd daemon is running, kill it. -n, --uuids number When issuing a test request to a running uuidd, request a bulk response of number UUIDs. -P, --no-pid Do not create a pid file. -p, --pid path Specify the pathname where the pid file should be written. By default, the pid file is written to /run/uuidd/uuidd.pid. -q, --quiet Suppress some failure messages. -r, --random Test uuidd by trying to connect to a running uuidd daemon and request it to return a random-based UUID. -S, --socket-activation Do not create a socket but instead expect it to be provided by the calling process. This implies --no-fork and --no-pid. This option is intended to be used only with systemd(1). It needs to be enabled with a configure option. -s, --socket path Make uuidd use this pathname for the unix-domain socket. By default, the pathname used is /run/uuidd/request. This option is pri- marily for debugging purposes, since the pathname is hard-coded in the libuuid library. -T, --timeout number Make uuidd exit after number seconds of inactivity. -t, --time Test uuidd by trying to connect to a running uuidd daemon and request it to return a time-based UUID. -V, --version Output version information and exit. -h, --help Display help screen and exit. EXAMPLE
Start up a daemon, print 42 random keys, and then stop the daemon: uuidd -p /tmp/uuidd.pid -s /tmp/uuidd.socket uuidd -d -r -n 42 -s /tmp/uuidd.socket uuidd -d -k -s /tmp/uuidd.socket AUTHOR
The uuidd daemon was written by Theodore Ts'o <tytso@mit.edu>. SEE ALSO
uuid(3), uuidgen(1) AVAILABILITY
The uuidd daemon is part of the util-linux package and is available from the Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux July 2014 UUIDD(8)
All times are GMT -4. The time now is 03:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy