[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possibly a bug

From: Valentin Bajrami
Subject: Possibly a bug
Date: Mon, 20 Apr 2015 23:01:41 +0200

Hi everyone,

While testing an awk script and piping the script to a command the following seem to occur. Not sure if this is even a bash problem. Here are some details about my configuration:

$ echo "$BASH_VERSION"

The file called 'history' contains the following code

$ cat history
#!/bin/awk -f

BEGIN { OFS="\t" ; print "COMMAND", "COUNT", "HASHING" }
END { for (i in a) print a[i], i | "sort -rn | head -n5"; $1 > max; max = $1
    i=s=20*$1/max;while(i-->0)bar=bar"#"; printf "%5s %5d %s %s", $2, $1,bar, "\n"

Now when running ./history | his  where his is not an existing command it fails and adds an entry in the job list.

$ ./history | his

[2]+  Stopped                 ./history | his
bash: his: command not found...

Running twice the output becomes:

$ jobs -l
[1]-  6556 Killed                  ./history
      6557 Stopped (tty input)     | his
[2]+  6830 Stopped (tty input)     ./history
      6831                       | his

I seem not to be able to clean up the jobs.

Can anyone explain what is really happening?

Met vriendelijke groet,

Valentin Bajrami

reply via email to

[Prev in Thread] Current Thread [Next in Thread]