Hi
I'm using cygwin and the script below works just fine under cygwin..
when i upload it on a unix server the script fails with the following errors
-awk: syntax error near line 1
-awk: bailing out near line 1
any ideas why?
thanx
awk '($2 ~ /*/) {
if ($4 < 40){
print... (3 Replies)
Hi,
I've got a file like the following:
Starting to process segment 0 (and symmetry related segments)
Number of (cancelled) singularities: 0
Number of (cancelled) negative numerators: 0
Segment 0: 5.49secs
Starting to process segment 1 (and symmetry related segments)
Number of... (7 Replies)
Hi , i am having some problem with re-reading the same file in AWK.
here is the scenario.
function 1 {
some_string > " file1 " # i have redirected output to file1.
...........
........
}
Now in
function 2 {
... (1 Reply)
I am trying to output the total number of records that have name and address within there specific fields i.e. $6 (surname) $9 (address). The file that redirects in is a csv file.
The code is wrong somewhere as i have another awk similar to this that reads in the same file and that works... (2 Replies)
I am wondering if anyone has any idea how to use an awk within awk to read files and find a match which adds to count.
Say I am searching how many times the word crap appears in each files within a directory. How would i do that from the command prompt ...
thanks (6 Replies)
Hello,
I trying to extract text that is surrounded by xml-tags. I tried this
cat tst.xml | egrep "<SERVER>.*</SERVER>" |sed -e "s/<SERVER>\(.*\)<\/SERVER>/\1/"|tr "|" " "
which works perfect, if the start-tag and the end-tag are in the same line, e.g.:
<tag1>Hello Linux-Users</tag1>
... (5 Replies)
Hi I am trying to execute the following awk script in unix but getting
the following error
awk: syntax error near line 1
awk: bailing out near line 1
for i in `cat search`
do
grep -i -l $i *.sas | awk -v token=$i '{print token "\t" $0}'
done
Please let me know what could be the... (4 Replies)
Hi All,
Content of mydatafile-
Name Age
-------------- ---------------
Raju P 20 years
Hari 25 years
Priya S 30 years
I need output like-
The age of Raju P is 20 years
The age of Hari is 25 years
The age of Priya S is... (3 Replies)
If you see this:
awk: syntax error near line 1
awk: bailing out near line 1
Chances are you are working on Solaris and you are using standard awk.
If so, you need to use /usr/xpg4/bin/awk instead, which is POSIX awk (or nawk if that is not available). (1 Reply)
I need to know if there is a way to use the while read command from a awk record. The record has 3 or 4 lines and I need the line to be all of the record instead of just each line of it.
nawk 'BEGIN {RS="!"} /atm pvc/ {print $0}' router.list | while read line
do
VP=`echo "$line" | egrep "atm... (7 Replies)
Discussion started by: numele
7 Replies
LEARN ABOUT DEBIAN
ledgersmb::dbobject::draft
LedgerSMB::DBObject::Draft(3pm) User Contributed Perl Documentation LedgerSMB::DBObject::Draft(3pm)NAME
LedgerSMB::DBObject::Draft - LedgerSMB base class for managing "drafts."
SYNOPSIS
This module contains the methods for managing unapproved, unbatched financial transactions. This does not contain facities for creating
such transactions, only searching for them, and posting them to the books.
METHODS
search()
returns a list of results for the search criteria. This list is also stored in $draft->{search_resuts}
Requres $self->{type} to be one of 'ar', 'ap', or 'gl'
Optional hash entries for search criteria are:
with_accno: Draft transaction against a specific account. from_date: Earliest date for match to_date: Latest date for match
amount_le: total less than or equal to amount_ge: total greater than or equal to
approve()
Approves the draft identified by the transaction id in $draft->{id}. Once approved, the draft shows up in financial reports.
delete()
Deletes the draft associated with transaction id in $draft->{id}.
Naturally, only unapproved transactions can be deleted. Once posted to the books, a draft may not be deleted.
COPYRIGHT
Copyright (C) 2009 LedgerSMB Core Team. This file is licensed under the GNU General Public License version 2, or at your option any later
version. Please see the included License.txt for details.
perl v5.14.2 2012-03-25 LedgerSMB::DBObject::Draft(3pm)