Sponsored Content
Full Discussion: csv file editing using KSH
Top Forums Shell Programming and Scripting csv file editing using KSH Post 302519506 by zaxxon on Wednesday 4th of May 2011 07:21:24 AM
Old 05-04-2011
Code:
awk -F, '$2 ~ /^".*"$/ {print FS $2 FS $(NF-1)}' infile > newfile; cat newfile
,"A",42
,"N",40

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Editing file during running ksh in HP failed

Hi falks, I have the following program: #!/bin/ksh ed -s /home/ias/v9.0.3/j2ee/OC4J_RiGHTv_HPCD2/applications/Xbip/Xbip/WEB -INF/config/application.properties <<EOF >/dev/null 1 d . d . a application.filePath.core = /core-HPCD2/Html/ application.filePath.xbip =... (2 Replies)
Discussion started by: nir_s
2 Replies

2. Shell Programming and Scripting

Editing a ksh script > Please assist!

I am trying to edit a script that contains the following: /DBA/general/sh/rman_backup.ksh -d PROD2 -l 1 I am trying to add a logic in the script such that if /DBA/general/sh/rman_backup.ksh does not exists, then the script would return an error code of 1. Otherwise, the script continues... (4 Replies)
Discussion started by: ora_umair
4 Replies

3. Shell Programming and Scripting

ksh script to create a generic csv file from different source formats

Hi all, I have a requirement to create a "superset" file out of a number of different sources with some different and some same columns. We intend to have a manually updateable SuperSetCols.csv which would look like "ColA","ColB","ColC","ColD","ColE","ColF","ColG" so someday we may add... (3 Replies)
Discussion started by: Leedor
3 Replies

4. Shell Programming and Scripting

Assign field value in a .csv file to a variable using ksh

Hi, I'm new to the scripting world... I want to know that how can I assign the the field value(that has multiple lines) of a .csv file to a variable??? Model of my .csv file : 1 Poppy 5 2 red 6 3 black 5 4 white 8 and so on,the list... (4 Replies)
Discussion started by: srim
4 Replies

5. Shell Programming and Scripting

create csv in ksh from tricky log file

hi guys, trying to create a csv from a tricky log file in ksh, using 'awk '{print $1" "$14" "$15" "$16" "$17" "$18" "$19}' >> $TMP_FILE' on another set of files I have an output file with hundreds of lines in which looks like so: ABC_DEFGHI_16_JKLMNP11.20101115_095412_374.log:09:54:29.579... (3 Replies)
Discussion started by: rich@ardz
3 Replies

6. Shell Programming and Scripting

Editing crontab via ksh

Hi all, I am trying the following I am hoping that the crontab would be changed. but it prints the previous crontab and says Can anyone tell me the correct ksh command that should be used here? I don't want to edit the crontab with crontab -e, I need to edit it via ksh. Thank... (2 Replies)
Discussion started by: ajaba
2 Replies

7. Shell Programming and Scripting

Compare 2 csv files in ksh and o/p the difference in a new csv file

(say) I have 2 csv files - file1.csv & file2.csv as mentioned below: file1.csv ID,version,cost 1000,1,30 2000,2,40 3000,3,50 4000,4,60 file2.csv ID,version,cost 1000,1,30 2000,2,45 3000,4,55 6000,5,70 The... (7 Replies)
Discussion started by: Naresh101
7 Replies

8. Shell Programming and Scripting

ksh CSV to XML file (noob tier)

Hey all, I'm very new to shell scripting and would love some help. I have been messing around with KSH at my job, and have been tasked with generating an XML file from multiple CSV files. However, I barely even understand the syntax for for loops! Output should be something along the lines of ... (2 Replies)
Discussion started by: Parrakarry
2 Replies

9. Shell Programming and Scripting

ksh - Read input from file and output CSV i same row

Hello I have the following output and want the output to look: FROM: GigabitEthernet0/0 is up, line protocol is up 1 input errors, 0 CRC, 0 frame, 1 overrun, 0 ignored 275 output errors, 0 collisions, 3 interface resets GigabitEthernet0/1 is up, line protocol is up 0... (4 Replies)
Discussion started by: JayJay2018
4 Replies

10. UNIX for Beginners Questions & Answers

Csv file editing

Help me, I have a csv file with following fields: sim name1 name2 name3 name4 name5 count file1 0.1 0.2 0.3 0.4 0.5 file2 0.1 0.2 0.3 0.4 0.5 file3 0.1 0.2 0.3 0.4 0.5 file4 0.1 0.2 0.3 0.4 0.5 ... (6 Replies)
Discussion started by: vinnu0154
6 Replies
SNOWDROP(1)						      General Commands Manual						       SNOWDROP(1)

NAME
sd-eng, sd-engf, sd-c - text watermarking and watermark recovery SYNOPSIS
sd-eng [-6] -i origfile newfile "Recipient" ["Comment"] sd-eng [-6] -e origfile newfile sd-eng [-6] -l DESCRIPTION
snowdrop is a stenographic text watermarking and watermark recovery system. It is composed of three programs: sd-eng Watermark normal English text. sd-engf Watermark fine quality English text, yeilding higher quality output but encoding less information. sd-c Watermark C code. The three programs operate similarly, with the same parameters and usage. The watermark is encoded in using a number of techniques, such as whitespace reformatting, typo insertation, word substitutions, punctuation changes, and for C code, logic reordering, variable name man- gling, etc. The watermark is a md5sum, which is retreivable from as little as 5 or 10 lines of the watermarked document. Even large changes to a medium sized document should not obscure the watermark, as it is stored redundently in multiple independent channels. The three usage modes are adding a watermark, checking for the presense of a watermark, and listing the contents of your database of water- marks. Note that to later check a watermark, you must retain a copy of the original, un-watermarked file. OPTIONS
-i Inject a watermark into a file. You must pass it the original file, the filename to output the watwrmarked version to, information about who you intend the watermarked file for, and an optional comment. -e Extract a watermark from a file. Needs the original file and the new file that you suspect bears the watermark. -l Lists the contents of the watermark database. Each of the three programs will have a different list. -6 Enable 64 bit watermarking. The default is a weak 32 bit watermark. ENVIRONMENT
SD_SYNONYMS This variable can be used to point snowdrop at a customized synonyms file. FILES
~/.snowdrop/database Database of watermarked files. SEE ALSO
/usr/share/snowdrop/README Explain snowdrop in more depth, its limitations, and how to write additional watermarking modules for other tpyes of files. AUTHOR
Michal Zalewski <lcamtuf@coredump.cx> SNOWDROP(1)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy