Sponsored Content
Full Discussion: awk continue
Top Forums Shell Programming and Scripting awk continue Post 302174074 by dmwaff on Monday 10th of March 2008 01:51:23 AM
Old 03-10-2008
If you are not tied to awk. Sed works on removing leading and trailing whitespace.

awk '{print $0 }' inputFile |sed -e 's/^ //g' -e 's/ $//g'
or
sed -e 's/^ //g' -e 's/ $//g' inputFile
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

continue the suspended jobs

Guys, Any idea how to continue suspended job in background ? ihave tried to use the bg% command <root> but it doesnt work. unix> jobs +suspended du > usage -suspended (sleep 60; date) unix> bg %2 (sleep 60; date) But my suspended work doesnt seems to continue run in background.. Any... (6 Replies)
Discussion started by: killerserv
6 Replies

2. Shell Programming and Scripting

Will the continue function work ????

I have written a script which does a following functions:- 1) Check a area if it is mounted or not 2) If the area is not mounted it will prompt the user to mount the are. 3) Once the area is mounted and the option is given as Y or y the script continues... My question is will the below... (2 Replies)
Discussion started by: kamlesh_p
2 Replies

3. Shell Programming and Scripting

continue example

The following code for search a pattern in file name (or entire file name) and look at its size, code is derived from an ebook about scripting. It is working in HP Unix but I am unable to run in Linux (Ubuntu) Please advise me what is wrong for Linux? And besides , how can I get rid of errors in... (7 Replies)
Discussion started by: xramm
7 Replies

4. Shell Programming and Scripting

Are you sure you want to continue connecting (yes/no) need a way to pass in the value yes without

Are you sure you want to continue connecting (yes/no) need a way to pass in the value yes without use the except command. I am creating a script to send down files to an application servers every time it reboots as it picks up the newest image. I do not want to manual connect to each server... (1 Reply)
Discussion started by: 3junior
1 Replies

5. Shell Programming and Scripting

call b.sh from a.sh, and continue to a.sh after use exit 0 from b.sh

Hi, I have two sh file. a.sh and b.sh b.sh is command and used by other sh's. I want to add below line to b.sh. When it is done with b.sh I want to continue to process a.sh. But when I use exit 0 in b.sh it is exit from b.sh and a.sh How can I make it to continue to process? a.sh ... (2 Replies)
Discussion started by: ctuncer
2 Replies

6. Shell Programming and Scripting

Break vs Continue

Okay so I am having trouble understand what the computer will do with a code like this if ; then echo echo "Found the file" blah blah blah for i in `blah blah blah` ; do ... (2 Replies)
Discussion started by: shade917
2 Replies

7. Shell Programming and Scripting

Continue problem

Hey all. First-time poster, long-time reader I'm on Mac, and I've written a long script to open up a maximum of 20 Terminal windows and run a subscript with a different input in each of them. When each of these sub-scripts finishes, it changes the value of a variable ("$windows") by -1, which... (4 Replies)
Discussion started by: Diabadass
4 Replies

8. Shell Programming and Scripting

If else continue to check value until it it is right

i have script which get Input via READ value and compare it from file. when found do some stuff...if not found again ask for Input until you dont enter Right value. #!/bin/ksh echo "SID must be in oratab file" echo "Enter ORACLE_SID of Database:\c " read ORACLE_SID x=`cat /etc/oratab|... (3 Replies)
Discussion started by: tapia
3 Replies

9. Shell Programming and Scripting

awk - continue when encountered division error

Hello, How can I add a logic to awk to tell it to print 0 when encountering a division by zero attempted? Below is the code. Everything in the code works fine except the piece that I want to calculate read/write IO size. I take the kbr / rs and kbw / ws. There are times when the iostat data... (5 Replies)
Discussion started by: tommyd
5 Replies

10. Shell Programming and Scripting

Continue the loop if the value is not found

Dear Help, Is it possible to continue the loop by going to the next available value, if the 'expected value' is not found. I have a list of values which might not get incremented by fixed value and hence the loop could break and the script could terminate. Any suggestion is appreciated. ... (1 Reply)
Discussion started by: Indra2011
1 Replies
ODBC_FETCH_ROW(3)							 1							 ODBC_FETCH_ROW(3)

odbc_fetch_row - Fetch a row

SYNOPSIS
bool odbc_fetch_row (resource $result_id, [int $row_number]) DESCRIPTION
Fetches a row of the data that was returned by odbc_do(3) or odbc_exec(3). After odbc_fetch_row(3) is called, the fields of that row can be accessed with odbc_result(3). PARAMETERS
o $result_id - The result identifier. o $row_number - If $row_number is not specified, odbc_fetch_row(3) will try to fetch the next row in the result set. Calls to odbc_fetch_row(3) with and without $row_number can be mixed. To step through the result more than once, you can call odbc_fetch_row(3) with $row_number 1, and then continue doing odbc_fetch_row(3) without $row_number to review the result. If a driver doesn't support fetching rows by number, the $row_number parameter is ignored. RETURN VALUES
Returns TRUE if there was a row, FALSE otherwise. PHP Documentation Group ODBC_FETCH_ROW(3)
All times are GMT -4. The time now is 02:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy