Sponsored Content
Full Discussion: Formating questions
Top Forums Shell Programming and Scripting Formating questions Post 302884943 by RudiC on Wednesday 22nd of January 2014 12:08:40 PM
Old 01-22-2014
I thought I had tested that as well. Rats! Try this:
Code:
awk '{gsub (/CHAR\(([^1]|[12][0-9])\)/,"VAR&")}1' file
cur_rev_stage_cd VARCHAR(15) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
prev_rev_stage_cd VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
revrec_prcs_cd VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,
revrec_cur_rev_stage_cd VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
revrec_prev_rev_stage_cd VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
svc_base_cd VARCHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC,
pkging_type_cd VARCHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC,
bus_tran_type_cd CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,
dvc_nm VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
cust_intln_cd VARCHAR(3) CHARACTER SET LATIN NOT CASESPECIFIC,
cash_only_flg CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,
shpmt_type_cd CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Disk formating

i have to repartition some of my filesystems ... I have just one HDD .... df -k gives this :- Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 830107 45532 726468 6% / /dev/dsk/c0t0d0s1 1987399 785728 1142050 41% /usr /proc ... (1 Reply)
Discussion started by: DPAI
1 Replies

2. UNIX for Dummies Questions & Answers

Formating in Echo?

Hi, In my code: echo " Field1 " " Filed2 " " Filed3 " >> $myfile echo "--------" "------- " "--------">> $myfile echo $value1 $value2 $value3 >> $myfile echo $value1 $value2 $value3 >> $myfile echo $value1 $value2 $value3 >> $myfile My file... (4 Replies)
Discussion started by: redlotus72
4 Replies

3. Shell Programming and Scripting

formating date

Guys I have a date value like this in a table -> 2006-12-29 12:57:08(data type varchar2(25)) I am trying to subtract this column from sysdate. I am unable to do that. can u guys suggest me a way to do this.. (2 Replies)
Discussion started by: ragha81
2 Replies

4. Shell Programming and Scripting

Output formating

Dear All I am stuck in one problem. Kindly help me. I am taking below mention file as input file and want some op file as mention below. Kindly send me all possible suggestion and query. Thnaks Jaydeep bELOW IS THE INPUT FILE: *** Connected to BSCANGR ***... (1 Reply)
Discussion started by: jaydeep_sadaria
1 Replies

5. Shell Programming and Scripting

formating output

Hi all, I want to start a new topic on this matter I have this script, #!perl use strict; use warnings; use Data::Dumper; open my $log, '>', 'log-external.txt' or die "Could not open log: $!"; print $log "Subnet,Static,DHCP,Unused\n"; open my $dump, '>', 'dump.log' or die... (2 Replies)
Discussion started by: richsark
2 Replies

6. Shell Programming and Scripting

Text formating

Dear all I had input file as mention below and want op as mention. Kindly let me knw possible ways. Regards Jaydeep INPUT: RXOTX-48-1 2A 34 2B 35 RXOTX-499-2 2C 32 RXOTX-4-1 2D 23 OUTPUT: (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

7. Shell Programming and Scripting

Formating output

Hello Team i have a file with following data (as columns). I need implement a syntax like below for altering table ALTER TABLE1 TABLENAME ADD COLUMN COL1 CHAR(5) NOT NULL WITH DEFAULT ADD COLUMN COL2 CHAR(5) .. .. ADD COLUMN COLn CHAR(5) NOT NULL... (1 Reply)
Discussion started by: rocking77
1 Replies

8. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

9. UNIX for Dummies Questions & Answers

Help with formating when using mailx

Hi I am a newbie here. I tried searching for the solution but I guess I either didn't find it or there hasn't been one posted. my problem is I spooled the results of a query into a .txt file. When I cat the file the formating looks great. All the columns are aligned. However once I mailx the... (2 Replies)
Discussion started by: RB26DETT
2 Replies

10. UNIX for Beginners Questions & Answers

File formating help

Hi all, I am having the file below I need that as below Thanks, Arun (12 Replies)
Discussion started by: arunkumar_mca
12 Replies
JOIN(1) 								FSF								   JOIN(1)

NAME
join - join lines of two files on a common field SYNOPSIS
join [OPTION]... FILE1 FILE2 DESCRIPTION
For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by whitespace. When FILE1 or FILE2 (not both) is -, read standard input. -a SIDE print unpairable lines coming from file SIDE -e EMPTY replace missing input fields with EMPTY -i, --ignore-case ignore differences in case when comparing fields -j FIELD (obsolescent) equivalent to `-1 FIELD -2 FIELD' -j1 FIELD (obsolescent) equivalent to `-1 FIELD' -j2 FIELD (obsolescent) equivalent to `-2 FIELD' -o FORMAT obey FORMAT while constructing output line -t CHAR use CHAR as input and output field separator -v SIDE like -a SIDE, but suppress joined output lines -1 FIELD join on this FIELD of file 1 -2 FIELD join on this FIELD of file 2 --help display this help and exit --version output version information and exit Unless -t CHAR is given, leading blanks separate fields and are ignored, else fields are separated by CHAR. Any FIELD is a field number counted from 1. FORMAT is one or more comma or blank separated specifications, each being `SIDE.FIELD' or `0'. Default FORMAT outputs the join field, the remaining fields from FILE1, the remaining fields from FILE2, all separated by CHAR. AUTHOR
Written by Mike Haertel. REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>. COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for join is maintained as a Texinfo manual. If the info and join programs are properly installed at your site, the command info join should give you access to the complete manual. join (coreutils) 4.5.3 February 2003 JOIN(1)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy