Sponsored Content
Top Forums Shell Programming and Scripting Need help with formatting file in UNIX Post 302581922 by kr123 on Wednesday 14th of December 2011 11:17:05 AM
Old 12-14-2011
zzz111 is a dummy value i want to insert next to the values

for the second answer i got the below error

bash-3.00$ awk '{ $1="z" substr($1, 2) } 1' pools > output
awk: syntax error near line 1
awk: bailing out near line 1
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

formatting of file in unix

i have a txt file in which it contains some lines each line contains some 350-400 characters but when i read the file line by line in ksh it is telling the max characters in each line is between 100-127 characters in each line it contains some values with some spaces in between when i try to... (2 Replies)
Discussion started by: trichyselva
2 Replies

2. Shell Programming and Scripting

data formatting in Unix shell Scripting

#! /bin/ksh ############################ # AFI Monitor Script ############################ . /db2/uszlad48/sqllib/db2profile export mondir=/home/script/krishna export monlog=$mondir/Error_Report_`date +%Y%m%d`.log echo "connect to database r2pdev" >>$monlog db2 connect to r2pdev user... (1 Reply)
Discussion started by: regnumber
1 Replies

3. Shell Programming and Scripting

Formatting text file in unix

Hi, I am using the following format command for formatting my text file in unix. awk -F":" '{ printf "%-50s%-1s%-50s\n", $1,":", $2}' filename > targetfile The target file is then sent as an attachment via email. When I view the target file in notepad multiple lines get spanned as a... (2 Replies)
Discussion started by: AAA
2 Replies

4. Shell Programming and Scripting

File formatting in unix

Hi , I have a text file noname.txt containing 1000+ records like this. One of the record I have given below. Input will b e like this BOT: 2010/06/01 00:25:59 21 = "private" Access-Method = 31 NCC = GBR 01 =... (5 Replies)
Discussion started by: smalya
5 Replies

5. Shell Programming and Scripting

Formatting date time in unix

while read l do vTimeCreated=`perl -e '@d=localtime ((stat(shift))); printf "%02d-%02d-%04d %02d:% 02d:%02d\n", $d,$d+1,$d+1900,$d,$d,$d' ${l}` echo "${l} || ${vTimeCreated}" >> ${fPrefx}_Output_Files_${vDate}.txt done < servername.txt Using the above code to format date time for each of the... (0 Replies)
Discussion started by: HeadBang
0 Replies

6. Shell Programming and Scripting

Formatting csv file in Unix script

Hi, Am using the following command to create a csv file paste File_1.csv File_4.csv File_7.csv >Out1.csv paste File_2.csv File_5.csv File_8.csv >>Out1.csv paste File_3.csv File_4.csv File_9.csv >>Out1.csv Input Data: Expected Output: Column 1 Column 2 ... (2 Replies)
Discussion started by: meva
2 Replies

7. Shell Programming and Scripting

Formatting sql in UNIX

hi folks am running the shell script below #!/bin/bash sqlplus 'scott@orcl/tiger'<<ENDSQL >> outputlogfile.csv SET PAGES 0 SET HEAD ON SET ECHO OFF SET FEEDBACK OFF SET LINESIZE 100 SET PAGESIZE 100 SET SERVEROUTPUT ON --# Fire the query on database select * from employee; ... (2 Replies)
Discussion started by: coolboy98699
2 Replies

8. Shell Programming and Scripting

Help in UNIX to Windows file formatting

Hi Techies, i need in n UNIX to Windows file formatting. i have created a csv file using a script and mailed it to my email, when i open the file with Excel sheet it looks like below Collector_no|_|Collector_Name|_|SE_Count|_|Installed_Domains|_|CPU_Sys|_|CPU_Idle|_|Memory_Util... (9 Replies)
Discussion started by: mahi_mayu069
9 Replies

9. Shell Programming and Scripting

UNIX Date Formatting

Hi I have a shell variable storing DATE in YYYY-MM-DD format is there a way i extract required field say only DD Also, would be great if there is a way which could take date format as well so that code is generic for any date format eg DDMMYYYY or DD/MM/YYYY or YYYY/MM/DD etc. Thanks (4 Replies)
Discussion started by: skyineyes
4 Replies

10. Shell Programming and Scripting

Formatting the output in UNIX

Hi All, Here is an oracle command to list out the bug fix patches applied on Oracle Software. (hostname)/home/oracle-> $ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed The output of this command is as follows(Pasting only relevant section): List of Bugs fixed by Installed Patches: ... (3 Replies)
Discussion started by: veeresh_15
3 Replies
XGFUPDATE(1)						      General Commands Manual						      XGFUPDATE(1)

NAME
xgfupdate - updates an Xgridfit program file to the latest version. SYNOPSIS
xgfupdate file DESCRIPTION
Xgfupdate is a utility that updates an Xgridfit program file so that it validates against the current xgridfit.rnc schema. Xgfupdate out- puts the updated file to stdout. To capture the output in a file, use this syntax: $xgfupdate [options] infile > outfile OPTIONS
-h Display a help message and exit. -v 1|2 Choose a mode in which to run Xgfupdate. "1" updates an Xgridfit program so that it will validate against the 2.0 schema. "2" updates an Xgridfit program from version 1.x or 2.0 to version 2.1 by adding the Xgridfit namespace; it also revises XInclude elements to be aware of the Xgridfit namespace. FILES
/usr/share/xml/xgridfit/util/xgf-update.xsl /usr/share/xml/xgridfit/util/xgf-add-namespace.xsl XSLT scripts that do the updating. /usr/share/xml/xgridfit/util/add-blanks.sed A Sed script that does some formatting of the output. SEE ALSO
xgridfit(1). AUTHOR
Xgfupdate was written by Peter Baker <psb6m@virginia.edu>. This manual page was written by Peter Baker 2009-12-18 XGFUPDATE(1)
All times are GMT -4. The time now is 07:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy