Sponsored Content
Top Forums Shell Programming and Scripting Newbie help - parsing through a file Post 302997216 by Aia on Tuesday 9th of May 2017 11:39:07 PM
Old 05-10-2017
Perl
Code:
perl -ne 'print unless /new/i' lokhtar.example

Gnu sed
Code:
sed '/new/Id' lokhtar.example

sed
Code:
sed '/[Nn][Ee][Ww]/d' lokhtar.example

AWK
Code:
awk 'BEGIN{IGNORECASE=1} ! /new/' lokhtar.example

grep
Code:
grep -iv new lokhtar.example

Ruby
Code:
ruby -pe 'next if /new/i' lokhtar.example


Last edited by Aia; 05-10-2017 at 12:46 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Newbie question about difference between executable file and ordinary file

Hi, I am newbie in unix and just started learning it. I want to know what is the difference between an executable file and a file (say text file). How to create executable file? What is the extension for that? How to differentiate ? How does it get executed? Thanks (1 Reply)
Discussion started by: Balaji
1 Replies

2. Shell Programming and Scripting

Finding & Moving Oldest File by Parsing/Sorting Date Info in File Names

I'm trying to write a script that will look in an /exports folder for the oldest export file and move it to a /staging folder. "Oldest" in this case is actually determined by date information embedded in the file names themselves. Also, the script should only move a file from /exports to... (6 Replies)
Discussion started by: nikosey
6 Replies

3. UNIX for Dummies Questions & Answers

Script for parsing details in a log file to a seperate file

Hi Experts, Im a new bee for scripting, I would ned to do the following via linux shell scripting, I have an application which throws a log file, on each action of a particular work with the application, as sson as the action is done, the log file would vanish or stops updating there, the... (2 Replies)
Discussion started by: pingnagan
2 Replies

4. Shell Programming and Scripting

Parsing file, yaml file? Extracting specific sections

Here is a data file, which I believe is in YAML. I am trying to retrieve just the 'addon_domains" section, which doesnt seem to be as easy as I had originally thought. Any help on this would be greatly appreciated!! I have been trying to do this in awk and mostly bash scripting instead of perl... (3 Replies)
Discussion started by: Rhije
3 Replies

5. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

6. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

7. Shell Programming and Scripting

Parsing Array - Newbie

Hello, I'm a newbie to the world of programming and so i decided to learn perl. I'm working on a project that telnets into a Cisco router and eliminates a specific line but i can't seem to get the thing to work. I dump the output into an array but i'm having a difficult time looking for the... (1 Reply)
Discussion started by: xmaverick
1 Replies

8. Shell Programming and Scripting

Newbie.. Find if a file exists and open, if not create the desired file..

Hey all, I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far.. #! bin/bash echo "Enter desired file" read "$file" if ... (5 Replies)
Discussion started by: Byrang
5 Replies

9. Shell Programming and Scripting

Looking for help with parsing file contents in bash [newbie]

Hi I'm just messing around with bash and trying to learn it because I have a course next semester dealing with OS design where we need to know how to use SSH client and either bash or ksh. I've never done shell scripting before. I just started today and I was wondering how parsing files... (1 Reply)
Discussion started by: mehungry
1 Replies

10. OS X (Apple)

Newbie needs to find file

I need to find a file using Applescript. Applescript is so slow. Someone on the Apple forums gave me some unix code and it works for the most part. The ls command is really list and not find but when it works, it returns the path to the file instantly, NOT 45 seconds Applescript takes. here is... (11 Replies)
Discussion started by: sbrady
11 Replies
PORTABASE(1)						      General Commands Manual						      PORTABASE(1)

NAME
portabase - an easy-to-use personal database application SYNOPSIS
portabase [ -h | --help | <file> ] portabase command [ -p password ] [ options ] <fromfile> <tofile> DESCRIPTION
PortaBase (portable database) is a personal database application that is available for many platforms, including Linux, Mac OS X, Windows, and Maemo. PortaBase's features include: - One data table per file - String, Integer, Decimal, Boolean, Note (multi-line text), Date, Time, Calculation, Sequence, Image, and Enum column types - Add, edit, and delete rows of data - Custom data views (subsets of the columns in any order) - Filter the displayed rows using sets of conditions - Sort the rows by any combination of columns, each in ascending or descending order - Optional page navigation buttons, with a custom number of rows per page - Add, delete, rearrange, and rename columns at any time - Specify default values for columns - View summary statistics for columns (total, average, min, max, etc.) - Import data from CSV, XML, and MobileDB files - Export data to CSV and XML files - Command-line format conversions (to and from XML, from MobileDB) - Data file encryption - Unicode support - Pick any available font to use throughout the application COMMANDS
PortaBase uses the following commands to indicate a command-line file conversion: fromxml Create a new PortaBase file from the input XML file. frommobiledb Create a new PortaBase file from the input MobileDB file. fromcsv Add rows to an existing PortaBase file from the input CSV file. toxml Create a new XML file from the input PortaBase file. tocsv Create a new CSV file from the input PortaBase file. If an encrypted PortaBase file is to be read or created, the following option can be used immediately after the command: -p <password> Open or create the encrypted PortaBase file using the given password The toxml and tocsv commands accept the following options: -v <view> Apply the named view before exporting. -s <sorting> Apply the named sorting before exporting. -f <filter> Apply the named filter before exporting. The fromcsv command supports one option: -e <encoding> Specifies the text encoding of the imported CSV file; options are UTF-8 (the default) and Latin-1. OPTIONS
PortaBase accepts the following options: -h, --help Display usage instructions. FILES
$HOME/.qt/portabaserc - user-specific settings. Stores information on font, checkbox editing, delete confirmations, etc. AUTHOR
This manual page was written by Jeremy Bowman <jmbowman@alum.mit.edu>, for the Debian GNU/Linux system (but may be used by others). April 16, 2010 PORTABASE(1)
All times are GMT -4. The time now is 10:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy