05-09-2014
This should be easily done with awk.
With 31 posts already, how far have you gotten in your implementation AND where exactly are you stuck?
Please show the effort!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, i've two files (file1, file2) i want to take value (in column1) and search in file2 if the they match print the value from file2.
this is what i have so far.
awk 'FILENAME=="file1"{ arr=$1 }
FILENAME=="file2"
{print $0}
' file1 file2 (2 Replies)
Discussion started by: myguess21
2 Replies
2. Shell Programming and Scripting
hi;
my file2.txt:portname=1;list=10.11;l-
portname=2;list=10.12;l-
portname=3;list=10.13;l-
...
my file1.txt:;"{'sector=%27'}"\&>
so; i want to see:portname=1;list=10.11;l-;"{'sector=%27'}"\&>
portname=2;list=10.12;l-;"{'sector=%27'}"\&>
portname=3;list=10.13;l-;"{'sector=%27'}"\&>... (4 Replies)
Discussion started by: gc_sw
4 Replies
3. Shell Programming and Scripting
Hi
I started to learn bash a week ago. I need filter the strings from the last column of a "file2" that match with a column from an other "file1"
file1:
chr10100036394-100038350AK077761
chr10100041065-100046547AK032226
chr10100041065-100046547AK016270
chr10100041065-100046547AK078231
...... (6 Replies)
Discussion started by: geparada88
6 Replies
4. Shell Programming and Scripting
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
Discussion started by: right_coaster
4 Replies
5. Shell Programming and Scripting
Hi Friends,
I am new to Shell Scripting and need your help in the below situation.
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- "Application handle" is the common field in both the files.
(NOTE :- PLEASE REFER TO THE ATTACHMENT "Compare files... (2 Replies)
Discussion started by: Santoshbn
2 Replies
6. UNIX for Dummies Questions & Answers
I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string.
I'm looking to match column1 in file1 to the number... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
7. Shell Programming and Scripting
HI,
I would like a little help on writing a if statement.
What i have so far is:
#!/bin/bash
FILE1=path/to/file1
FILE2=path/to/file2
echo ${FILE1} ${FILE2}
if ]
then
echo file1 and file2 not found
else
echo FILE ok
fi (6 Replies)
Discussion started by: techy1
6 Replies
8. UNIX for Dummies Questions & Answers
Platform : Oracle linux 6.5
I have two log files with the following contents
# ls -l
total 8
-rw-r--r--. 1 root root 75 Dec 10 20:55 myLogfile1.log
-rw-r--r--. 1 root root 51 Dec 10 20:57 myLogfile2.log
#
# cat myLogfile1.log
hello world
jaded zombies acted quaintly but kept driving... (9 Replies)
Discussion started by: kraljic
9 Replies
9. UNIX for Dummies Questions & Answers
I want to print only the lines in file2 that match file1, in the same order as they appear in file 1
file1
file2
desired output:
I'm getting the lines to match
awk 'FNR==NR {a++}; FNR!=NR && a' file1 file2
but they are in sorted order, which is not what I want:
Can anyone... (4 Replies)
Discussion started by: pathunkathunk
4 Replies
10. Shell Programming and Scripting
I am trying to use awk to find all the $2 values in file2 which is ~30MB and tab-delimited, that are between $2 and $3 in file1 which is ~2GB and tab-delimited.
I have just found out that I need to use $1 and $2 and $3 from file1 and $1 and $2of file2 must match $1 of file1 and be in the range... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT DEBIAN
jekyll
JEKYLL(1) User Commands JEKYLL(1)
NAME
Jekyll - is a blogaware, static site generator.
USAGE
jekyll # . -> ./_site
jekyll <path to write generated site>
# . -> <path>
jekyll <path to source> <path to write generated site>
# <path> -> <path>
jekyll import <importer name> <options>
# imports posts using named import script
Configuration is read from '<source>/_config.yml' but can be overridden using the following options:
OPTIONS
--file [PATH]
File to import from
--dbname [TEXT]
DB to import from
--user [TEXT]
Username to use when importing
--pass [TEXT]
Password to use when importing
--host [HOST ADDRESS]
Host to import from
--site [SITE NAME]
Site to import from
--[no-]safe
Safe mode (default unsafe)
--[no-]auto
Auto-regenerate
--server [PORT]
Start web server (default port 4000)
--no-server
Do not start a web server
--base-url [BASE_URL]
Serve website from a given base URL (default '/'
--[no-]lsi
Use LSI for better related posts
--[no-]pygments
Use pygments to highlight code
--rdiscount
Use rdiscount gem for Markdown
--redcarpet
Use redcarpet gem for Markdown
--kramdown
Use kramdown gem for Markdown
--time [TIME]
Time to generate the site for
--[no-]future
Render future dated posts
--permalink [TYPE]
Use 'date' (default) for YYYY/MM/DD
--paginate [POSTS_PER_PAGE]
Paginate a blog's posts
--limit_posts [MAX_POSTS]
Limit the number of posts to publish
--url [URL]
Set custom site.url
--version
Display current version
AUTHOR
This manual page was written by Youhei SASAKI <uwabami@gfd-dennou.org>, for the Debian GNU/Linux system(but may be used by others).
Jekyll 0.11.2 May 2012 JEKYLL(1)