Sponsored Content
Top Forums Shell Programming and Scripting Split single rows to multiple rows .. Post 302489987 by sri_aue on Sunday 23rd of January 2011 07:34:05 AM
Old 01-23-2011
Split single rows to multiple rows ..

Hi pls help me out to short out this problem


rm PAB113_011.out
rm: PAB113_011.out: override protection 644 (yes/no)? n

If i give y it remove the file.

But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as below

joly!edwopr(Dv03) /apps/edw/Direct_DW/Dv03/output
==> ksh test.ksh
hi
rm: /apps/edw/Direct_DW/Dv03/output/ is a directory
rm: PAB113_011.out: override protection 644 (yes/no)?


is there anyway to give 'yes' in the script level itself.

Last edited by sri_aue; 01-28-2011 at 10:03 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Single Column into Multiple rows

i have single column which is starting with same string(many number of rows) i have to convert each into a single row.how can i do that? laknar std mes 23 55 laknar isd phone no address amount 99 I have to convert above like below. laknar|std|mes|23|55 laknar|isd|phone... (3 Replies)
Discussion started by: laknar
3 Replies

2. Shell Programming and Scripting

Single column into multiple rows

Hi all, I need to convert this file having just one column into two column file current file: a 15 b 21 c 34 d 48 e 10 wanted: a 15 b 21 c 34 (15 Replies)
Discussion started by: prachiagra
15 Replies

3. Shell Programming and Scripting

Converting Multiple rows to Single Row using unix commands

Can somebody help me in solving this.. Input data is like 0 A 1 B 2 C 3 D 0 A1 1 B1 2 C1 3 D1 0 A2 1 B2 2 C2 3 D2 Output should be like A B C D A1 B1 C1 D1 A2 B2 C2 D2 (7 Replies)
Discussion started by: Mahantesh Patil
7 Replies

4. Shell Programming and Scripting

How to merge multiple rows into single row if first column matches ?

Hi, Can anyone suggest quick way to get desired output? Sample input file content: A 12 9 A -0.3 2.3 B 1.0 -4 C 34 1000 C -111 900 C 99 0.09 Output required: A 12 9 -0.3 2.3 B 1.0 -4 C 34 1000 -111 900 99 0.09 Thanks (3 Replies)
Discussion started by: cbm_000
3 Replies

5. UNIX for Dummies Questions & Answers

[SOLVED] splitting a single column(with spaces) into multiple rows

Hi All, My requisite is to split a single column of phonemes seperated by spaces into multiple rows. my input file is: a dh u th a qn ch A v U r k my o/p should be like: adhu a dh u (3 Replies)
Discussion started by: girlofgenuine
3 Replies

6. Shell Programming and Scripting

Transpose multiple rows (with a mix of space and enter) to a single column

How to change the uploaded weekly file data to the following format? New Well_Id,Old Well_Id,District,Thana,Date,Data,R.L,WellType,Lati.,Longi. BAG001,PT006,BARGUNA,AMTALI,1/2/1978,1.81,2.29,Piezometer,220825,901430 BAG001,PT006,BARGUNA,AMTALI,1/9/1978,1.87,2.29,Piezometer,220825,901430... (3 Replies)
Discussion started by: sara.nowreen
3 Replies

7. Shell Programming and Scripting

Convert single column into multiple rows

Convert Single column to multiple rows file a.txt contains data like below Server=abc Run=1 Tables=10 Sessions=16 Time=380 Jobs=5 Server=abc Run=2 Tables=15 Sessions=16 Time=400 Jobs=5 Server=abc Run=3 Tables=20 Sessions=16 Time=450 (5 Replies)
Discussion started by: sol_nov
5 Replies

8. Shell Programming and Scripting

Converting a single row to multiple rows

Hi, I want to convert a single row values to multiple rows, but the no. of rows are not fixed. For example, I have a row as below abc-def-lmn-mno-xyz out put should be get abc get def get lmn get xyz (4 Replies)
Discussion started by: Suneel Mekala
4 Replies

9. Shell Programming and Scripting

Converting Single Column into Multiple rows

Hi .. anyone can you help me ? i need to convert text below into multiple columns interface; GigabitEthernet0/0/0/0 description; TRUNK_PE-D2-JT2-VPN_Gi0/0/0/0_TO_ME4-A-JKT-JT_4/1/1_1G mtu 9212 negotiation auto interface; GigabitEthernet0/0/0/0.11 description; tes encapsulation;... (1 Reply)
Discussion started by: mad3linux
1 Replies

10. UNIX for Beginners Questions & Answers

How to split one long column into multiple rows with 3 each ?

I have a large csv dataset like this : A value1 A value2 A value3 B value1 B value2 B value3 C value1 C value2 C value3 what I expected output is :A value1 value2 value3 B value1 value2 value3 C value1 value2 value3 I'm thinking of use like awk, columns , but haven't find a proper... (4 Replies)
Discussion started by: nengcheng
4 Replies
PG_NUM_ROWS(3)															    PG_NUM_ROWS(3)

pg_num_rows - Returns the number of rows in a result

SYNOPSIS
int pg_num_rows (resource $result) DESCRIPTION
pg_num_rows(3) will return the number of rows in a PostgreSQL result resource. Note This function used to be called pg_numrows(3). PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others). RETURN VALUES
The number of rows in the result. On error, -1 is returned. EXAMPLES
Example #1 pg_num_rows(3) example <?php $result = pg_query($conn, "SELECT 1"); $rows = pg_num_rows($result); echo $rows . " row(s) returned. "; ?> The above example will output: 1 row(s) returned. SEE ALSO
pg_num_fields(3), pg_affected_rows(3). PHP Documentation Group PG_NUM_ROWS(3)
All times are GMT -4. The time now is 07:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy