I wanted to use GAWK's 'word boundary' feature but can't
get it to work. Doesn't GAWK support \<word\>?
Sample record:
Title Bats in the fifth act of Chushingura (top);
the... (6 Replies)
Hello,
In shared memory, when using shmget function, first parameter is ket_t key.
I know it is an integer type, but length of it is system dependent. That means may not be have integer's ranges.
What is range of key_t in Linux? Is it different in distros, for example in ubuntu & fedora? (2 Replies)
Hi All..I need a help i am trying to find a word using below script whereas the word exists in my file nitin.txt as a directory but still i am getting "word not found" output..Your suggestions welcomed.:
#to check for existence of nitin
#!/bin/bash
cd /apps/uat1/deploy/app
ls -lrt >... (4 Replies)
Hi,
Putting across a few awk expressions.
Apart from the last, all of them are working.
echo a/b/c | awk -F'/b/c$' '{print $1}'
a
echo a/b/c++ | awk -F'/b/c++' '{print $1}'
a
echo a/b/c++ | awk -F'/b/c++$' '{print $1}'
a/b/c++
Request thoughts on why putting a '$' post double ++... (12 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Hello, everyone.
I am having trouble figuring out sed command which emulates uniq. The task I want to do is that 2 consecutive lines in file should be considered the same using the first word only. Example:
cat tmp.txt
ddd eee
aaa bbb ccc
ddd eee fff
asd fdd
asd fdd bbb
aaa bbb
asd fgh... (4 Replies)
SOLVED, thank you!
Edit2:
Good news everyone,
I managed to get it down to a "simple" problem, but I still have some syntax issues.
Here is the code which troubles me:
awk 'BEGIN{x2=0;x1=0;crit=0;}
$1 < 1000000 {x2=$4; diffx=x2-x1; x1=x2;
diffx > 3.6 ? {crit=1} : {crit=0};... (2 Replies)
Hi Experts,
Can you please advise , why I am not able to make it work, or why this is not working: I spent quite a lot of time on this figuring out , but not working,
file :
This is a test file thanks for your reply
This is another file again
Have a nice day this is a small file... (3 Replies)
I have a multicolumn text file with header in the first row like this
The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach
for ii in ${hdr}
do
gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT LINUX
echo
ECHO(1) User Commands ECHO(1)NAME
echo - display a line of text
SYNOPSIS
echo [SHORT-OPTION]... [STRING]...
echo LONG-OPTION
DESCRIPTION
Echo the STRING(s) to standard output.
-n do not output the trailing newline
-e enable interpretation of backslash escapes
-E disable interpretation of backslash escapes (default)
--help display this help and exit
--version
output version information and exit
If -e is in effect, the following sequences are recognized:
\ backslash
a alert (BEL)
backspace
c produce no further output
e escape
f form feed
new line
carriage return
horizontal tab
v vertical tab
NNN byte with octal value NNN (1 to 3 digits)
xHH byte with hexadecimal value HH (1 to 2 digits)
NOTE: your shell may have its own version of echo, which usually supersedes the version described here. Please refer to your shell's docu-
mentation for details about the options it supports.
AUTHOR
Written by Brian Fox and Chet Ramey.
REPORTING BUGS
Report echo bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report echo translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for echo is maintained as a Texinfo manual. If the info and echo programs are properly installed at your site, the
command
info coreutils 'echo invocation'
should give you access to the complete manual.
GNU coreutils 8.5 February 2011 ECHO(1)