Sponsored Content
Full Discussion: Awk and read bailing out
Top Forums Shell Programming and Scripting Awk and read bailing out Post 302429809 by Scrutinizer on Tuesday 15th of June 2010 03:38:57 PM
Old 06-15-2010
Hi sol_nov,

I noticed it may be possible to further simplify your script to something like this.
Code:
while read from_date to_date id
do
  echo "executing $from_date $to_date $id"
done < outFile_R.out

Perhaps that could be of use to you...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

-awk: bailing out near line 1

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)
Discussion started by: kion
3 Replies

2. Shell Programming and Scripting

Help with awk - read from file

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)
Discussion started by: giorgos193
7 Replies

3. Shell Programming and Scripting

How to re-read a file in AWK

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)
Discussion started by: madhaviece
1 Replies

4. Shell Programming and Scripting

Using awk to read a field

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)
Discussion started by: Pablo_beezo
2 Replies

5. UNIX for Dummies Questions & Answers

Using Awk within awk to read all files in directory

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)
Discussion started by: flevongo
6 Replies

6. Shell Programming and Scripting

Read content between xml tags with awk, grep, awk or what ever...

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)
Discussion started by: Sebi0815
5 Replies

7. Shell Programming and Scripting

AWK syntax /bailing script error when executing in UNIX

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)
Discussion started by: nandugo1
4 Replies

8. Shell Programming and Scripting

How to use awk with while read line

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)
Discussion started by: NARESH1302
3 Replies

9. Answers to Frequently Asked Questions

awk: bailing out

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)
Discussion started by: Scrutinizer
1 Replies

10. Shell Programming and Scripting

awk read RS

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
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)
All times are GMT -4. The time now is 01:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy