Sponsored Content
Top Forums Shell Programming and Scripting ksh - Read input from file and output CSV i same row Post 303013116 by RudiC on Thursday 15th of February 2018 08:32:37 AM
Old 02-15-2018
Try also
Code:
awk 'BEGIN {print "Interface, Input Errors, Output Errors"} {printf "%s%s", $1, !(NR%3)?RS:", "}' file
Interface, Input Errors, Output Errors
GigabitEthernet0/0, 1, 275
GigabitEthernet0/1, 0, 42

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to read a CSV file and generate SQL output

Friends, This is what I need: I will pass a CSV file as an input, and I want my shell to be reading that CSV file, and based on the parameters it should generate SQLs and write those SQL in a different file in the same location. I'm new to Shell scripting. I'm currently working on a... (1 Reply)
Discussion started by: Ram.Math
1 Replies

2. Shell Programming and Scripting

Read a CSV file and generate SQL output

Friends, This is what I need: I will pass a CSV file as an input, and I want my shell to be reading that CSV file, and based on the parameters it should generate SQLs and write those SQL in a different file in the same location. I'm new to Shell scripting. I'm currently working on a... (25 Replies)
Discussion started by: Ram.Math
25 Replies

3. Shell Programming and Scripting

[KSH] Creating automatic variable from read input

Hello there, I am posting to seek help with a KSH script, I am making a simple calculation program where the user can enter as many numbers as they like, I am getting their input using the read command, however I am not sure how to repeat doing this and storing the input in to new variables... (7 Replies)
Discussion started by: pandapowerbox
7 Replies

4. Shell Programming and Scripting

Read multiple input from CLI :ksh

Hi folks.. i got a requirement to red multiple directories from STDIN and store them to a variable. ex:- echo "Enter directory to add:" echo " Enter directory to add:" read value till there is input and when there is no input close the read loop and store variable into an array ... (1 Reply)
Discussion started by: bangaram
1 Replies

5. Shell Programming and Scripting

ksh using input file with output going to same file name and location

I've been asked if I can write a "quick" little ksh script that will do the following: java java_class_file /dir/input_file.xml /dir/output_file.xml I'm a complete newbie with ksh so any help would be appreciated. This is on AIX and java is found in /usr/java5/jre/bin/java (4 Replies)
Discussion started by: newbie_ksh
4 Replies

6. Shell Programming and Scripting

Read file from input and redirect to output file

Hi , i am having an file which contains 5 file_name data, i need to read the file name and will perform certain operation and generate out file names with named as 5 individual file_names for eg: file.txt contains file_name1.txt|hai file_name2.txt|bye file_name3.txt|how... (3 Replies)
Discussion started by: rohit_shinez
3 Replies

7. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies

8. Shell Programming and Scripting

ksh loop to read input until QUIT

Hi I'm looking to write a simple ksh loop reading user input (and write it to a file) until the user enters QUIT at which point I want it to continue. Does anyone have an example of this type of loop? Any help much appreciated Cheers (2 Replies)
Discussion started by: Grueben
2 Replies

9. Shell Programming and Scripting

ksh to read input until QUI

Hello all I'm looking to write a simple script (ksh/sh/bsh) to read user input and write it to a file (adding each time) until the user enters QUIT at which point I'm hoping to ask some more questions. Any help much apprecited (2 Replies)
Discussion started by: Grueben
2 Replies

10. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
PPMNTSC(1)                                                    General Commands Manual                                                   PPMNTSC(1)

NAME
ppmntsc - make a portable pixmap look like taken from an American TV SYNOPSIS
ppmntsc [ --pal ] [ --legalonly ] [ --illegalonly ] [ --correctedonly ] [ --verbose ] [ --debug ] [ infile ] Minimum unique abbreviations of options are acceptable. DESCRIPTION
This program makes colors legal in the NTSC (or PAL) color systems. Often, images generated on the computer are made for use in movies which ultimately end up on video tape. However, the range of colors (as specified by their RGB values) on a computer does not match the range of colors that can be represented using the NTSC (or PAL) systems. If an image with "illegal" colors is sent directly to an NTSC (or PAL) video system for recording, the "illegal" colors will be clipped. This may result in an undesirable looking picture. This utility tests each pixel in an image to see if it falls within the legal NTSC (or PAL) range. If not, it raises or lowers the pixel's saturation in the output so that it does fall within legal limits. Pixels that are already OK just go unmodified into the output. Input is from the file named input. If input is -, input is from Standard Input. If you don't specify input, input is from Standard Input. Output is always to Standard Output. This program handles multi-image PPM input, producing multi-image PPM output. OPTIONS
--pal Use the PAL transform instead of the default NTSC. --verbose Print a grand total of the number of illegal pixels. --debug Produce a humongous listing of illegal colors and their legal counterparts. NOTE: This option may produce a great deal of output. --legalonly Output only pixels that are already legal. Output black in place of pixels that are not. --illegalonly Output only pixels that are illegal (and output them uncorrected). Output black in place of pixels that are already legal. --correctedonly Output only pixels that are corrected versions of illegal pixels. Output black in place of pixels that are already legal. SEE ALSO
ppm(5), ppmdepth(1), ppmdim(1), ppmbrighten(1) AUTHOR
Wes Barris, Minnesota Supercomputer Center, Inc., Bryan Henderson 4th Berkeley Distribution April 19, 2000 PPMNTSC(1)
All times are GMT -4. The time now is 04:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy