Sponsored Content
Top Forums Shell Programming and Scripting Filtering data from text to csv Post 302852117 by Corona688 on Tuesday 10th of September 2013 02:38:46 PM
Old 09-10-2013
You have shown the data you don't want, but haven't shown the data you do want, so I don't understand what you want your output to look like.

You can simplify your code as such:

Code:
#! /bin/bash

while read i
do
        echo "$i ............ "
        ssh -n username@$i "< /etc/fstab column -t | grep 'bur-filer.*'"
done < fqdn.txt > fstab.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Exporting text file data to csv

Could any one help me in basic shell script to export text file data to csv. I need to export only particular data from text file to csv column. I am a newbie to UNIX could anyone help me with sample script code (3 Replies)
Discussion started by: l_jayakumar
3 Replies

2. Shell Programming and Scripting

Help with pulling / filtering data from a .csv

Good day Gurus, I have a csv file that contains an inventory of active servers. This csv file contains a well over a hundred systems (IBM, SUN, HP). It also contains those systems details. See below for an example hostA,invver,1.02,20100430 hostA,date,08/30/2010,06:18 hostA,use,"Unknown... (4 Replies)
Discussion started by: LuffyDMonkey
4 Replies

3. Shell Programming and Scripting

Text file to CSV with field data separated by blank lines

Hello, I have some data in a text file where fields are separated by blank lines. There are only 6 fields however some fields have several lines of data as I will explain. Also data in a particular field is not consistently the same size but does end on a blank line. The first field start with... (6 Replies)
Discussion started by: vestport
6 Replies

4. Shell Programming and Scripting

Reading 2 CSV files and filtering data based on group

I have two CSV files in the following format: First file: GroupID, PID:TID, IP, Port Sample data: 0,1000:11,127.0.0.1,445 0,-1:-1,127.0.0.1,800 1,1000:11,127.0.0.1,445 1,-1:-1,127.0.0.1,900 2,1000:11,127.0.0.1,445 2,-1:-1,180.0.0.3,900 Second file: IP,Port,PID Sample data... (6 Replies)
Discussion started by: rakesh_arxmind
6 Replies

5. Shell Programming and Scripting

Filtering out lines in a .csv file

Hi Guys, Would need your expert help with the following situation.. I have a comma seperated .csv file, with a header row and data as follows H1,H2,H3,H4,H5..... (header row) 0,0,0,0,0,1,2.... (data rows follow) 0,0,0,0,0,0,1 ......... ......... i need a code... (10 Replies)
Discussion started by: dev.devil.1983
10 Replies

6. Shell Programming and Scripting

Converting data for text file to csv

Gents Using the script attached (raw2csv). i use to create the file .csv.. The input file is called 201.raw. Kindly can you check if there is easy way to do it. The script works fine but takes a lot time to process Thanks for your help (8 Replies)
Discussion started by: jiam912
8 Replies

7. Shell Programming and Scripting

Read multiple text files and copy data to csv

hi i need to extract lines from multiple files to a csv file. for example, i have these 3 files file1.txt date:29dec1980 caller:91245824255 called:8127766 file2.txt date:11apr2014 caller:9155584558 called:8115478 file3.txt date:25jun2015 caller:445225552 called:8117485 (30 Replies)
Discussion started by: lp.descamps
30 Replies

8. 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

9. Shell Programming and Scripting

Need help with csv filtering

Hello everyone, i am stuck with a task i was meant to do so i came here. So i have a .csv file which structure is : year;temperature;precipitation 2012;32;483 2006;28;517 ... I want to note that it is in fact ";" not a space, which a new file named <old-name>-new.txt, the first line must ... (2 Replies)
Discussion started by: Needhelp123
2 Replies

10. UNIX for Beginners Questions & Answers

Filtering records of a csv file based on a value of a column

Hi, I tried filtering the records in a csv file using "awk" command listed below. awk -F"~" '$4 ~ /Active/{print }' inputfile > outputfile The output always has all the entries. The same command worked for different users from one of the forum links. content of file I was... (3 Replies)
Discussion started by: sunilmudikonda
3 Replies
QUOTAON(8)						    BSD System Manager's Manual 						QUOTAON(8)

NAME
quotaon, quotaoff -- turn filesystem quotas on and off SYNOPSIS
quotaon [-g] [-u] [-v] filesystem ... quotaon [-g] [-u] [-v] -a quotaoff [-g] [-u] [-v] filesystem ... quotaoff [-g] [-u] [-v] -a DESCRIPTION
quotaon announces to the system that disk quotas should be enabled on one or more filesystems. quotaoff announces to the system that the specified filesystems should have any disk quotas turned off. The filesystems specified must have entries in /etc/fstab and be mounted. quotaon expects each filesystem to have quota files named quota.user and quota.group which are located at the root of the associated file system. These defaults may be overridden in /etc/fstab. By default both user and group quotas are enabled. Available options: -a If the -a flag is supplied in place of any filesystem names, quotaon/quotaoff will enable/disable all the filesystems indicated in /etc/fstab to be read-write with disk quotas. By default only the types of quotas listed in /etc/fstab are enabled. -g Only group quotas listed in /etc/fstab should be enabled/disabled. -u Only user quotas listed in /etc/fstab should be enabled/disabled. -v Causes quotaon and quotaoff to print a message for each filesystem where quotas are turned on or off. Specifying both -g and -u is equivalent to the default. FILES
quota.user at the filesystem root with user quotas quota.group at the filesystem root with group quotas /etc/fstab filesystem table SEE ALSO
quota(1), libquota(3), fstab(5), edquota(8), quotacheck(8), repquota(8) HISTORY
The quotaon command appeared in 4.2BSD. BSD
December 11, 1993 BSD
All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy