I was wondering if it was possible to tell awk to print the output of a command in the print.
.... | awk '{print $0}'
I would like it to print the date right before $0, so something like (this doesn't work though)
.... | awk '{print date $0}' (4 Replies)
Hi,
I want to write the shell script to change multple file name (the file name is get from DB)
e.g. cp db1.txt file1_new.txt
cp db2.txt file2_new.txt
cp db3.txt file3_new.txt
I have write the script like this:
VAR=`sqlplus -s $LOGON @<<ENDOFTEXT
set termout off
... (0 Replies)
Dear All,
1.txt (tab in between each value in a line)
a b c
a b c
a c d
you can see below, why with ~ i can output with tab, but = cannot?
# awk -F'\t' '$2 ~ /b/' 1
a b c
a b c
# awk -F'\t' '$2 = "b"' 1
a b c
a b c
a b d
... (1 Reply)
#!/bin/bash
#...
for i in `ls -c1 /usr/share/applications`
do
name="cat $i | grep ^Name= | cut -d = -f2"
echo $name
#...
done
Now inside name as output is present:
while i want only the result of the command.
Ideally i would like obtain that information using only bash ... or... (8 Replies)
Hi,
I don't script often enough to know how to do this, and I can't seem to find a right example online. I have a csv output from an old, old system (Win2K???), from which I want to extract only certain fields. Initially I came up with something like this:
cat file1 | awk -F '"' '{print $8... (7 Replies)
Hi Friends,
Need Help. I have file1.txt as
File1.txt
|123|A|7267|Hyder|Cross|Sell|7801
|995|A|7051|2008|Lunar|New|Year|Promotion|7801
|996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801
|997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801
File2.txt... (7 Replies)
This should be extremely simple and someone will probably answer it in .5 seconds. I need to know what:
VARIABLE=${0##*/}
does? I do not have a shell handy to just try it in. I am reading through some scripts and need to understand this line. Any help is appreciated.
Many thanks!
-... (3 Replies)
Hello,
I'm writing an Awk script to take a command line argument (student's name) and output their relevant student#, name, and marks. For some reason, awk arbitrarily removes the first digit from the student number and doesn't show me the proper output.
Here is my code:
#! /usr/bin/awk -f... (6 Replies)
Hi All,
I am looking to filter out filesystems which are greter than a specific value.
I use the command
df -h | awk '$4 >=70.00 {print $4,$5}'
But this results out as below, which also gives for lower values.
9% /u01
86% /home
8% /u01/data
82% /install
70% /u01/app
Looks... (3 Replies)
The following is a multi-line shell command example:
$cargo build
Compiling prawn v0.1.0 (/Users/ag/rust/prawn)
error: failed to resolve: could not find `setup_panix` in `human_panic`
--> src/main.rs:14:22
|
14 | human_panic::setup_panix!();
| ... (2 Replies)
Discussion started by: yogi
2 Replies
LEARN ABOUT DEBIAN
apsfilter-bug
APSFILTER-BUG(1) BSD General Commands Manual APSFILTER-BUG(1)NAME
apsfilter-bug -- create a half-automatic bug report for apsfilter
SYNOPSIS
apsfilter-bug
OPTIONS
none
DESCRIPTION
With the apsfilter-bug script you can automatically create a bug report for apsfilter(1). A template report file is created which you can
edit with your favourite editor ( emacs(1) by default, or whatever is entered in the environment variable EDITOR ).
You will see a couple of lines starting with '#'; these lines will be removed before the report is sent. So if you want to use the '#' char-
acter at the beginning of a line, just indent it with a space.
A very important piece of the bug report is the debugging log created by aps2file(1), probably with a command like
aps2file -D -o /dev/null [-P...] [-Z...] [input] 2> log.txt
Unless you don't even have a chance to create a debugging log, it is crucial for serious bug hunting.
After you have filled in as much (useful) information as possible, you must save the file under its original name, then exit your editor.
If you invoked apsfilter-bug by accident, or if you need some additional system information to include into the bug report, just exit your
editor without saving the file.
NOTES
In addition to the stuff you've edited, some more information is appended to the bug report automatically:
apsfilter version 7.2.6-stable
ghostscript version (from 'gs --version')
system id (from 'uname -a')
configure options --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --with-awk=/usr/bin/awk --with-sendmail=/usr/sbin/sendmail
shell executable /bin/bash
awk executable /usr/bin/awk
sendmail executable /usr/sbin/sendmail
FILES
/usr/bin/aps2file script to create debugging output
SEE ALSO apsfilter(1), aps2file(1)BUGS
See apsfilter software center - http://www.apsfilter.org/ - for new versions, bugfixes and known bugs.
Please use the new tool apsfilter-bug(1) to release bug- or problem reports. It automatically presents you a form in an editor window which
asks you some standard questions. If you save and quit the editor session, then this report is sent automatically via e-mail to the proper
apsfilter mailinglist.
If apsfilter fails to print something or prints it in a way you wouldn't expect and you want to report an apsfilter error then please save
the debugging output of one print session using the new aps2file(1) utility by typing aps2file -D -Z options file > /dev/null 2> file.debug
and including the debugging output in the file file.debug into the edit session of the apsfilter-bug utility, so that it is included into the
mail to the apsfilter mailinglist.
Please note that you need to run /bin/sh (Bourne Shell), bash or a compatible shell, so that the above mentioned output redirection works.
Under C-shell (/bin/csh) or tcsh it would't work. If you don't know, then simply make sure you use the Bournce shell by typing /bin/sh or
bash, then you should have no problems with redirection of stdout and stderr (> /dev/null 2> file.debug).
DOCUMENTATION
See official apsfilter homepage
http://www.apsfilter.org/handbook.html Apsfilter Handbook including the Frequently Asked Questions (FAQ)
USER FORUM
Please send questions to the official apsfilter help channel apsfilter-help@apsfilter.org. The above section BUGS and the file
HOWTO-BUGREPORTS tells you how to report bugs. If you want to know how to troubleshoot your apsfilter installation, please read the manpage
aps2file(1) and apsfilter-bug(1) as well as the Apsfilter Handbook carefully.
HISTORY
The apsfilter-bug manpage has been written by Michael LoBin <phallobst@web.de> and first appeared in apsfilter V 7.1.0.
BSD Dec 26, 2001 BSD