Sponsored Content
Top Forums Shell Programming and Scripting generate tabular output from an input text file in unix shell scripting Post 302509981 by Klashxx on Friday 1st of April 2011 08:43:11 AM
Old 04-01-2011
A ksh:
Code:
while read k k k serv  k k path k sp
do
   printf "|%-6s|%25s|%4s|\n" "${serv}" "${path}" "${sp}"
done<infile

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Shell Scripting -- update employees not present in input file

ALL, My shell script takes a employee file as input. I have to identify the list of employees not in the input file and update their status in the database. Approach I followed: by traversing through the input file add all the emplid's to a variable. update the status of employees not in... (2 Replies)
Discussion started by: sailussr
2 Replies

2. Shell Programming and Scripting

how to use data in unix text file as input to an sql query from shell

Hi, I have data in my text file something like this. adams robert ahmed gibbs I want to use this data line by line as input to an sql query which i run by connecting to an oracle database from shell. If you have code for similar scenario , please ehlp. I want the output of the sql query... (7 Replies)
Discussion started by: rdhanek
7 Replies

3. Shell Programming and Scripting

Dynamic output file generation using a input text file with predefined output format

Hi, I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format. Example: File.txt AP|{SSHA}VEEg42CNCghUnGhCVg== APVG3|{SSHA}XK|"password" AP3|{SSHA}XK|"This is test" .... etc --------- test.sh has... (1 Reply)
Discussion started by: hudson03051nh
1 Replies

4. Shell Programming and Scripting

Unix Shell scripting -How to skip User Standard input section from another script

All, problem Description: For example: I have two shell scripts(executables). let name it as script1 and script2.I'm trying to execute script1 from script2. while executing script2, script1 is asking for manual input(input from keyboard). Now i need to know how I can skip this user input... (3 Replies)
Discussion started by: techie99
3 Replies

5. Shell Programming and Scripting

a shell script to generate an excel sheet from a text file..

hi, i have a text file that looks like this! i want to generate an excel sheet out of it, removing all the junk data except the addresses that look like . Arrow Electrical Services Rotating Machinery, Electrical Contracting & Mining Specialists Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies

6. Shell Programming and Scripting

Generate tabular data based on a column value from an existing data file

Hi, I have a data file with : 01/28/2012,1,1,98995 01/28/2012,1,2,7195 01/29/2012,1,1,98995 01/29/2012,1,2,7195 01/30/2012,1,1,98896 01/30/2012,1,2,7083 01/31/2012,1,1,98896 01/31/2012,1,2,7083 02/01/2012,1,1,98896 02/01/2012,1,2,7083 02/02/2012,1,1,98899 02/02/2012,1,2,7083 I... (1 Reply)
Discussion started by: himanish
1 Replies

7. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

8. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

9. Shell Programming and Scripting

Read csv file, convert the data and make one text file in UNIX shell scripting

I have input data looks like this which is a part of a csv file 7,1265,76548,"0102:04" 8,1266,76545,"0112:04" I need to make the output data should look like this and the output data will be part of text file: 7|1265000 |7654899 |A| 8|12660000 |76545999 |B| The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies

10. UNIX for Beginners Questions & Answers

Need list of input and output parameter of task in a text file, using shell script

//file begin ===== //some code task abcd_; input x; input y,z; //some comment output w; //some comment reg p; integer q; begin //some code end endtask : abcd_ //some code //file end ===== expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 Replies
NWCLIENT(5)							     nwclient							       NWCLIENT(5)

NAME
nwclient - configuration file for NWClient program suite DESCRIPTION
This manual page describes the rather simple format of the file $HOME/.nwclient, the configuration file for the NWClient program suite. FILE FORMAT
The file $HOME/.nwclient consists of several lines, each describing a NWClient connection. Lines beginning with # and empty lines are ignored as comments. Because you can store passwords in .nwclient, the user programs will only scan .nwclient when only the file owner has access rights to the file. The file must be have permissions 0600. To specify a NWClient connection, the name of the file server, the user name to be used and a password is necessary. The server name and the user name are specified as SERVER/USER, and the password is separated by a blank. The password field can be omitted. In this case the user programs will ask you for a password. If you specify the password to be just a dash, then no password is used. The first valid specification has a special meaning: If the user does not name a server on the command line, the first specification is used as a 'preferred connection'. An example might be the following: # The preferred connection, the user is asked # for a password FS311/ME # And a passwordless account on another server CD-SERV/GUEST - With these lines in $HOME/.nwclient, calling 'ncpmount /mnt' will mount the the file server FS311 with user name ME on /mnt after asking the user for a password. ncpmount -S cd-serv /cd will silently mount the server cd-serv on /cd. nprint, pqlist and other user programs that require a valid login also look up $HOME/.nwclient to find a file server, a user name and pos- sibly a password. Please note that the access permissions of .nwclient MUST be 600, for security reasons. SEE ALSO
ncpmount(8), ncpumount(8), slist(1), pqlist(1), nprint(1) nwclient 12/27/1995 NWCLIENT(5)
All times are GMT -4. The time now is 06:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy