Hi Guy's can someone help me in converting the following
I have a flat text file which has several thousand lines which I need to convert to a csv it's got a consistent format but basically want every time it hit's txt to create a new line with the subsequent lines comma delimited for example
... (6 Replies)
thanks for allowing me join your forum
i have an output of linux command "who"
which provides following details.....
CURRENT USER/ACCT INFO
17:31:36 up 4:49, 4 users, load average: 0.03, 0.04, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 - 12:59 ?xdm? 4:54 0.02s /bin/sh /usr/bi... (1 Reply)
INput file attached in thread : Column widths at 24,73,82,87,121 characters (sed 's/./,/24;s/./,/73;s/./,/81;s/./,/87;s/./,/121;s/ *, */,/g' fixedinputfile >output.csv
). The client wants instead of hard coding the column widths as they are not fixed .he has given the hint stating that ( ... (3 Replies)
Thank u every body ......just need a help so that a text file needs to be converted into CSV.............
my log file is as follows
Host scsi3: usb-storage
Vendor: Maxtor
Product: OneTouch III
Serial Number: 044303E5
Protocol: Transparent SCSI
Transport: Bulk
... (4 Replies)
I have a CSV file in the below format.
while generating CSV file from excel sheet , date in excel sheet(Format :Mon 8/28/2012) got converted into the below format with numbers 41148,41149 so on.
Could anyone please let me know how to the convert the numbers(41148,41149 so on.) to its actual... (2 Replies)
hi i hav a file called focus. which is the output file. i want to convert this file to html file and mail it. help with code and explanatio. i am basic in unix (7 Replies)
Hi,
I have following text file. I want to convert it into the below HTML format. Kindly help.
Input Text File
Header 1
=======
Name:***
Age:***
Address:***
Work Phone:***
Email:***
Mobile:***
Country:***
City:***
Pincode:***
some text here **** (10 Replies)
Hello,
I have a binary csv file that was created on 'Red Hat Enterprise Linux Server release 6.6'. Now we have transferred all files on Ubuntu 16.04.2 LTS/xenial
On opening the file in Ubuntu, there are special characters
... (8 Replies)
Discussion started by: nans
8 Replies
LEARN ABOUT OSF1
getopt
getopt(1) General Commands Manual getopt(1)NAME
getopt - Parses command line flags and arguments
SYNOPSIS
getopt format tokens
DESCRIPTION
The getopt command is used to parse a list of tokens using a format that specifies expected flags and arguments. A flag is a single ASCII
letter and, when followed by a : (colon), is expected to take a modifying argument that may or may not be separated from it by one or more
tabs or spaces. (You can include multi-byte characters in arguments, but not as flag letters.)
The getopt command completes processing when it has read all tokens or when it encounters the special token -- (double dash). It then out-
puts the processed flags, a --, and any remaining tokens.
If a token fails to match a flag, getopt writes a message to standard error.
NOTES
In the csh, use the following command to run getopt:
set argv=`getopt flag_string $*`
EXAMPLES
The following is an example of the use of getopt in a skeleton shell script to parse options:
#!/bin/sh # parse command line into arguments set -- `getopt a:bc $*` # check result of parsing if [ $? != 0 ] then
exit 1 fi while [ $1 != -- ] do
case $1 in
-a) # set up the -a flag
AFLG=1
AARG=$2
shift;;
-b) # set up the -b flag
BFLG=1;;
-c) # set up the -c flag
CFLG=1;;
esac
shift # next flag done shift # skip double dash # now do the work . . .
The following are all equivalent arguments to the script:
-a ARG -b -c -- A B C -a ARG -bc -- A B C -aARG -b -c -- A B C -b -c -a ARG -- A B C
SEE ALSO
Commands: sh(1)
Functions: getopt(3)getopt(1)