06-09-2010
never thought about just extra "f", to solve this
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
How do I combine the following 2 codes in one, the purpose is to not generate the outfile1
awk '{print $9 "\t" $10 "\t" $11}' infile > outfile1
awk '{ gsub(/.fa/,""); print }' outfile1 > outfile2
Thanks
Joseph (2 Replies)
Discussion started by: jdhahbi
2 Replies
2. Shell Programming and Scripting
Within one of my awk scripts, I have three variables extracted and calculated on. When done, I simply want to combine the three. The following works, but looks weird. My script reads a field that has text and numbers, knowing the last four comprise MMYY (month and year)
# YY are last two... (2 Replies)
Discussion started by: joeyg
2 Replies
3. Shell Programming and Scripting
I have an awk statement that works but I am calling awk twice and I know there has to be a way to combine the two statements into one. The purpose is to pull out just the ip address from loopback1.
cat config.txt | nawk 'BEGIN {FS="\n"}{RS="!"}{if ( $0 ~ "interface loopback1" ) print$4}' | nawk... (5 Replies)
Discussion started by: numele
5 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have the following two awk statements which I'd like to consolidate into one by piping the output from the first into the second awk statement (rather than having to write kat.txt out to a file and then reading back in).
awk 'BEGIN {FS=OFS=" "} {printf("%s ", $2);for (x=7; x<=10;... (3 Replies)
Discussion started by: kasan0
3 Replies
5. Shell Programming and Scripting
ignore the simplicity of the foo file, my actual file is much more hardcore but this should give you the jist of it. need to combine the two awks into one liner. essentially, need to return the value of one particular field in a file that has multiple comma separated fields. thanks guys
cat foo... (1 Reply)
Discussion started by: jack.bauer
1 Replies
6. Shell Programming and Scripting
awk '{a=$0} END {while (NR) print a}' mail.log | awk '/Feb 2/ {print ;exit;}'
first, can this code be combined into one?
what i want this code to do is output every single line it finds up until the last occurrence of "Feb 2".
right now, this code simply outputs one line, and aborts. ... (12 Replies)
Discussion started by: SkySmart
12 Replies
7. Shell Programming and Scripting
Need some help with this ... please
60644,NJ090237_0263_GRP,NJ090237_0263_VIEW,NJ090237_0263_PSGRP,NJ090237_0263_GOLD_CSGRP,,06E:0_08E:0_09E:0_11E:0,0CE5,TDEV,34,VP_TIER... (3 Replies)
Discussion started by: greycells
3 Replies
8. Shell Programming and Scripting
I have a file of 100,000 entries that look like:
chr1 980547 980667 +
chr1:980547-980667
chr1 980728 980848 +
chr1:980728-980848
chr1 980793 980913 +
chr1:980793-980913
I am trying to reformat them to into 5 columns that are tab delineated:
chr1 980547 980667 + ... (3 Replies)
Discussion started by: cmccabe
3 Replies
9. Shell Programming and Scripting
my code:
gawk 'NR>'"${LASTLINENUM}"' && NR<='"${LINEENDNUM}"'' ${LOGFILE} | gawk '{l=$0;} /'"${STRING1}"'/ && /'"${STRING2}"'/ {for (i=NR-'"${BEFOREGLAF}"'; i<=NR+'"${AFTERGLAF}"'; i++) o=i; t++;} END { for(i=1; i<=NR; i++) if (o) print l; print t+=0;}'
i would like to combine this into one... (5 Replies)
Discussion started by: SkySmart
5 Replies
10. UNIX for Beginners Questions & Answers
Hi, Below command is working as expected, but would like to know how to club the two AWK scripts in the command into one
echo -e "MMS000101S0203430A|20180412E|\nMMB0001INVESTMENT||107-86193-01-03|\nMMB0001FUND||107-86193-04-01|\nMMC9991 " | awk -F'|' -v OFS=, '/^MMC9991/{print r"|"s,t; next}... (3 Replies)
Discussion started by: JSKOBS
3 Replies
LEARN ABOUT DEBIAN
make-aisleriot-freecell-board
HOOLA(6) board_gen HOOLA(6)
NAME
make-gnome-freecell-board, make-aisleriot-freecell-board, make-microsoft-freecell-board, make-pysol-freecell-board - Programs to generate
boards to be used as input to Freecell Solver.
SYNOPSIS
program [-t] board-number
or for make-pysol-freecell-board:
program [-t] [-F] board-number [game-string]
or for make-aisleriot-freecell-board:
program [-t] board-number [game-string]
DESCRIPTION
These programs are command-line programs that can generate the initial board of the Freecell games of several popular Solitaire
implementations. Those boards can be in turn be inputted to fc-solve by means of a pipeline, or placed inside a file for safe-keeping.
make-pysol-freecell-board and make-aisleriot-freecell-board also accept an optional third argument which indicates the game type. This type
defaults to Freecell, but is useful for generating the boards of other games. Note that using this flag does not preclude one from using
the "--game" flag of fc-solve.
make_pysol_freecell_board.py accepts another parameter called -F or --pysolfc that deals the PySolFC boards instead of the classic PySol
ones.
A common paradigm for using those programs is something like:
bash:~$ make-microsoft-freecell-board 11982 | fc-solve -l gi
If the "-t" option is specified, then the 10 cards are printed with "T"'s, instead of "10"'s. While this does not have any effect on fc-
solve it may prove useful for other solvers or solitaire implementations which do not accept "10"'s.
Here is a short description of each program:
make-gnome-freecell-board
Generate the boards of the standalone Freecell program that comes with the GNOME desktop.
make-aisleriot-freecell-board
Generate the Freecell boards of GNOME's AisleRiot.
make-pysol-freecell-board
A Python script that generates the boards of the various games of PySol.
make-microsoft-freecell-board
A program that generates the boards of Microsoft Freecell and of the Freecell Pro implementation of Freecell.
OPTIONS
board-number is the board number as a decimal number.
game-string is a string describing the game. Valid strings and their respective games are:
bakers_game - Baker's Game (*)
bakers_dozen - Baker's Dozen (Broken) (*)
beleaguered_castle - Beleaguered Castle (*)
citadel - Citadel
cruel - Cruel
der_katz - Der Katzenschwantz
die_schlange - Die Schlange
eight_off - Eight Off (*)
fan - Fan
forecell - Forecell
freecell - Freecell (the default)
good_measure - Good Measure
ko_bakers_game - Kings' Only Baker's Game
relaxed_freecell - Relaxed Freecell
relaxed_seahaven - Relaxed Seahaven Towers
seahaven - Seahaven Towers (*)
simple_simon - Simple Simon (*)
streets_and_alleys - Streets and Alleys
make-aisleriot-freecell-board supports only the games marked with an asterisk (*).
SEE ALSO
fc-solve (6)
/usr/share/doc/freecell-solver-bin/README.board_gen
AUTHOR
Shlomi Fish, <http://www.shlomifish.org/> .
board_gen 3.12.0 2012-06-22 HOOLA(6)