i would like to enter (user input) a bunch of numbers seperated by space:
10 15 20 25
and use awk to print out any lines in a file that have matching numbers
so output is:
22 44 66 55 (10) 77 (20)
(numbers 10 and 20 matched for example)
is this possible in awk . im using gawk for... (5 Replies)
Hi all, I need to category the processes in my system with awk. And for now, there are several command with similar name, so i have to match more than one pattern to pick it out. for instance:
binrundb
the string1, 2 & 3 may contain word, number, blank or "/". The "bin" should be ahead "rundb"... (5 Replies)
I am trying to break a string into separate fields and print the field that matches a pattern. I am using awk at the moment and have gotten this far:
awk '{for(i=1;i<=NF;++i)print "\t" $i}' longstring
This breaks the string into fields and prints each field on a separate line.
I want to add... (2 Replies)
Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match.
I'm stuck in an AWK... (9 Replies)
Hi,
I have a tab delimited file "test.txt" like this:
id1 342 C/T
id2 7453 T/A/-/G/C
id3 531 T/C
id4 756 A/T/G
id5 23 A/G
id6 717 T/A/C
id7 718 C/T/A
And so on, with the possible choices for letters being A,C,T,G.
I would like to exclude from my file all the lines that do not have... (3 Replies)
Hello all. I am a beginner UNIX user who is using UNIX to work on a bioinformatics project for my university.
I have a bit of a complicated issue in trying to use sed (or awk) to "find and replace" bases (letters) in a genetics data spreadsheet (converted to a text file, can be either... (3 Replies)
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Hi everyone,
I am new to shell scripting, and would appreciate your help on following problem.
I need to search a file for a pattern, then get the number of each line that matches the given pattern.
Then I need to search those specific line numbers from the first file in a second file and... (6 Replies)
Trying to find out how to discover if the first 2 characters of a string are "22"
Not sure how.
I could use
if ]; then echo "yes";fi
But I think that will only grab the pattern 22 and not the first 2 digits. (5 Replies)
Hi!
I found and then adapt the code for my pipeline...
awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy
I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal...
It works but I have also some problems... here my columns
... (7 Replies)
Discussion started by: echo manolis
7 Replies
LEARN ABOUT SUSE
iconv
ICONV(1) Debian GNU/Linux ICONV(1)NAME
iconv - Convert encoding of given files from one encoding to another
SYNOPSIS
iconv -f encoding [-t encoding] [inputfile]...
DESCRIPTION
The iconv program converts the encoding of characters in inputfile, or from the standard input if no filename is specified, from one coded
character set to another. The result is written to standard output unless otherwise specified by the --output option.
--from-code, -f encoding
Convert characters from encoding.
--to-code, -t encoding
Convert characters to encoding. If not specified the encoding corresponding to the current locale is used.
--list, -l
List known coded character sets.
-c Omit invalid characters from output.
--output, -o file
Specify output file (instead of stdout).
--silent, -s
Suppress warnings, but not errors.
--verbose
Print progress information.
--help, -?
Give help list.
--usage
Give a short usage message.
--version, -V
Print program version.
ENCODINGS
The values permitted for --from-code and --to-code can be listed by the iconv --list command, and all combinations of the listed values are
supported. Furthermore the following two suffixes are supported:
//TRANSLIT
When the string "//TRANSLIT" is appended to --to-code, transliteration is activated. This means that when a character cannot be
represented in the target character set, it can be approximated through one or several similarly looking characters.
//IGNORE
When the string "//IGNORE" is appended to --to-code, characters that cannot be represented in the target character set will be
silently discarded.
AUTHOR
iconv was written by Ulrich Drepper as part of the GNU C Library.
This man page was written by Joel Klecker <espy@debian.org>, for the Debian GNU/Linux system.
3rd Berkeley Distribution lenny ICONV(1)