Having read and appreciating the comments, and being as overwhelmed as the others by the data files, and having removed the <CR> line terminators from the DOS/windows files, I'd like to propose for discussion (hoping to have guessed the requirements correctly)
Code:
awk 'FNR==NR {T[$1]=$2; next}
FNR==1 {$0=toupper($0)
for (n=1; n<=100; n++) if ($n in T) C[$n]=n
getline
next
}
{for (n in T) if (C[n]) print FNR, n, T[n], $4, $(C[n])
}
' OFS="," /tmp/paramaters.txt /tmp/CNAI_DUMP_RAW1.txt
This is working on a subset of the data; applying it to the entire data set as well as redirecting it to the desired output file is left to the reader.
Hi There
I needed to write a Unix shell script which will pick up the data from a .CSV file and reformat it as per the requirement and write it to another .CSV file.
Currently I am in the proess of Data Import to "Remedy System" (A one kind of incident mangement Application) and this... (8 Replies)
Hi,
I have gps receiver, by using gpsd data i can read gps log data to my database(my sql).
Steps:
1. telenet localhost 2947 > gps.txt (press enter)
2. r (press enter) //then i will get the data like below in gps.txt file
Trying 127.0.0.1...
Connected to localhost.... (1 Reply)
Hi all,
I have written a shell script to search a specified directory (e.g. /home/user) for a list of specific words (shown as ${TMPDIR}/wordlist below). The script works well enough, but I was wondering if there was a way to display the line number that the word is found on?
Thanks!
cat... (1 Reply)
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)
Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given
Name Domain Contact Phone Email Location
----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
Hi Unix Gurus,
I tried to convert the attached xhtml table content into csv file using unix shell script (lynx -dump filename) and got the below results:
Title ID Owner Priority Estimate Project Change Date Changed By
Complexity Create Date Created By Detail Estimate Total De tail... (6 Replies)
Hi Everyone ,
Below is output from a TL1 , I want just the NE Name: and beside that the Temperature and the voltages in a csv file , Is this possible?
> act-user:AB1S2a:ArshadFO:493::**********;
AB1S2a 2016-02-07 10:13:24
M 493 COMPLD
"ArshadFO:2016-02-07 10-04-55,0"
;... (11 Replies)
Hello Unix Shell Script Experts,
I have a script that would mask the columns in .csv file or .txt file.
First the script will untar the .zip files from Archive folder and processes into work folder and finally pushes the masked .csv files into Feed folder.
Two parameters are passed
... (5 Replies)
i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies
LEARN ABOUT OSF1
mattrib
mattrib(1) General Commands Manual mattrib(1)NAME
mattrib - mtools utility to change DOS file attribute options
SYNOPSIS
mattrib [-a | +a] [-h | +h] [-r | +r] [-s | +s] msdosfile [msdosfiles...]
The mattrib command sets (+) or clears (-) the attribute options of a DOS file.
OPTIONS
Sets or resets the archive bit. Some backup programs use this option to indicate a new file. Sets or resets the hidden-bit. This option
hides files from the DOS DIR command. To view these files, use the mdir command. Sets or resets the read-only bit. This option is used
to indicate a read-only file. If this bit is set, a file cannot be removed using the DOS DEL command. To remove the file, use the mdel
command. Sets or resets the system bit. This option is used by DOS to indicate an operating system file.
DESCRIPTION
The mattrib command sets the attribute options of a DOS file using the plus (+) operator, or clears attribute options using the minus (-)
operator. DOS pathnames that contain the '/' or '' separator are supported. If you use the '' separator or wildcards, you must enclose
file names in quotes to protect them from the shell.
The mcd command can be used to establish the device and the current working directory (relative to DOS), otherwise the default is A:.
RESTRICTIONS
The DOS version of the attrib command does not support all of the options listed on this reference page.
EXIT STATUS
The following exit values are returned: Success. Failure.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of mattrib: If set, this variable names the file that contains the name of the
current mtools working directory as established by the mcd command. If this variable is not set, the file $HOME/.mcwd is used.
FILES
Contains the name of the current mtools working directory as established by the mcd command. If this file does not exist, the default
mtools working directory is A:. Executable file
SEE ALSO
Commands: mcd(1), mdel(1), mdir(1), mtools(1)mattrib(1)