Sponsored Content
Top Forums Shell Programming and Scripting Command to print columns with space Post 302993081 by Scrutinizer on Monday 6th of March 2017 03:30:47 PM
Old 03-06-2017
Try something like this:
Code:
{
  read                           # skip header line
  while read SVM CIFS_SHARE PATH_NAME
  do
    if [ -n "$SVM" ]; then       # if $SVM is not empty, i.e. the line is not a blank line...
      echo "vserver cifs share create -vserver ${SVM} -share-name ${CIFS_SHARE} -path '${PATH_NAME}'"
    fi 
  done 
} < $OUTFILE2 > $SCRIPT


Last edited by Scrutinizer; 03-06-2017 at 04:36 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to space columns in a report

I have a program that calculates shipping cost for an item and prints the information to a file. I cannot seem to get the lines to print with equal spacing in columns. I need data like this to be aligned into columns: Optical Mouse 5 A $25 Compaq Presario 3... (2 Replies)
Discussion started by: turbulence
2 Replies

2. HP-UX

How to add space in between columns in VI editor

Hi, I am trying to add space after 3rd and 6th column for editing a file in special format. How should I achieve in VI?. So, is it possible to do in it in sed ? thanks vipa (1 Reply)
Discussion started by: vipas
1 Replies

3. Shell Programming and Scripting

help with delimiting columns with a space

Hi all, i am writting a script to fix some problems we have with data that we need that contains 1000s of records. I have a text file with 3 columns of data. The problem is there should be a space between the end of the first column and the start of the second column. The majority of the data is... (7 Replies)
Discussion started by: borderblaster
7 Replies

4. Shell Programming and Scripting

Single command for add 2 columns and remove 2 columns in unix/performance tuning

Hi all, I have created a script which adding two columns and removing two columns for all files. Filename: Cust_information_1200_201010.txt Source Data: "1","Cust information","123","106001","street","1-203 high street" "1","Cust information","124","105001","street","1-203 high street" ... (0 Replies)
Discussion started by: onesuri
0 Replies

5. Shell Programming and Scripting

awk or sed command to print specific string between word and blank space

My source is on each line 98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies

6. Shell Programming and Scripting

awk command to print multiple columns

Hello Team, I have written following command which is giving output is as shown below. bash-3.00$ grep -i startup catalina.out | tail +2 | sed -n 1p | awk -F" " '{ for (x=1; x<=5; x++) { printf"%s\n", $x } }' Dec 19, 2010 3:28:39 PM bash-3.00$ I would like to modify above command to... (2 Replies)
Discussion started by: coolguyamy
2 Replies

7. UNIX for Dummies Questions & Answers

help needed: remove space between certain columns

dear all, i have a data looks like this (i have 3000 columns): rs123 A T T G C C C C C C A A A A A A A A A A A ... rs154 T T G C C C C C A A A A A A A A A A T T G ... rs126 A C C C C C A A A A A A A A A A A A T T G ... I want to remove all the space after the 2nd column and make the... (2 Replies)
Discussion started by: forevertl
2 Replies

8. Shell Programming and Scripting

Columns to rows with space

Hi, My input is in the following way a b c d e f I would like to have it printed as a b c d e f Any awk scripts are appreciated. (1 Reply)
Discussion started by: jacobs.smith
1 Replies

9. Shell Programming and Scripting

Romove columns and replace a space with a character

Hi, I have a file containing this: testvol1 unix enabled testvol2 unix enabled testvol3 unix enabled testvol3 qtree1 unix enabled testvol3 qtree2 unix enabled testvol4 unix enabled testvol4 qtree1 unix enabled And I want an output of this: testvol1... (4 Replies)
Discussion started by: niap21
4 Replies

10. UNIX for Beginners Questions & Answers

How to use "awk" to print columns from different files in separate columns?

Hi, I'm trying to copy and paste the sixth column from a bunch of files into a single file having each column pasted in separate columns (and not one after each other in just one column.) I tried this code but works only partially because it copied and pasted 50 rows of each column... (6 Replies)
Discussion started by: Frastra
6 Replies
MSVMOCAS(1)						      General Commands Manual						       MSVMOCAS(1)

NAME
msvmocas - train a multi-class linear SVM classifier SYNOPSIS
msvmocas [options] example_file model_file DESCRIPTION
msvmocas is a program that trains a multi-class linear SVM classifier using the Optimized Cutting Plane Algorithm for Support Vector Machines (OCAS) and produces a model file. example_file is a file with training examples in SVM^light format, and model_file is the file in which to store the learned linear rule f(x)=W'*x. model_file contains M columns and D lines, where M is the number of classes and D the number of dimensions, corresponding to the elements of the matrix W [D x M]. OPTIONS
A summary of options is included below. General options: -h Show summary of options. -v (0|1) Set the verbosity level (default: 1) Learning options: -c float Regularization constant C. (default: 1) -n integer Use only the first integer examples for training. By default, integer equals the number of examples in example_file. Optimization options: -m (0|1) Solver to be used: 0 ... standard cutting plane (equivalent to BMRM, SVM^perf) 1 ... OCAS (default) -s integer Cache size for cutting planes. (default: 2000) Stopping conditions: -a float Absolute tolerance TolAbs: halt if QP-QD <= TolAbs. (default: 0) -r float Relative tolerance TolAbs: halt if QP-QD <= abs(QP)*TolRel. (default: 0.01) -q float Desired objective value QPValue: halt is QP <= QPValue. (default: 0) -t float Halts if the solver time (loading time is not counted) exceeds the time given in seconds. (default: infinity) EXAMPLES
Train the multi-class SVM classifier from example file example4_train.light, with the regularization constant C=10, verbosity switched off, and save model to msvmocas.model: msvmocas -c 10 -v 0 example4_train.light msvmocas.model Compute the testing error of the classifier stored in msvmocas.model with linclass(1) using testing examples from example4_test.light and save the predicted labels to example4_test.pred: linclass -e -o example4_test.pred example4_test.light msvmocas.model SEE ALSO
svmocas(1), linclass(1). AUTHORS
msvmocas was written by Vojtech Franc <xfrancv@cmp.felk.cvut.cz> and Soeren Sonnenburg <Soeren.Sonnenburg@tu-berlin.de>. This manual page was written by Christian Kastner <debian@kvr.at>, for the Debian project (and may be used by others). June 16, 2010 MSVMOCAS(1)
All times are GMT -4. The time now is 03:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy