I am having trouble matching multiple strings within an instanza. I ONLY want it to print if it finds both strings within the range. Example input (newlines between groups inserted only for readibility):
Keywords to match are "artist" and "play count"
And the desired output is:
Notice it skipped the 3rd group because it did not have both matches. I have little experience with AWK but I tried to mash solutions together like
^ which works but it includes group 3. I could not figure out how to insert the && operator instead of the "|", which I assume is what needs to happen.
How can I find which version of Awk is installed? OpSystem is HPUX 11.x
I am getting an error when trying to use the keyword nextfile and I dont know why! (Well, I can only assume that I have am using a version of Awk that does not support nextfile. However, according to O'Reilly, nextfile is... (3 Replies)
Hi friends,
I have a script that sets the env variable path based on different conditions.
Now the new path variable setting should not done in the same terminal or same shell.
Only a new terminal or new shell should have the new path env variable set.
I am able to do this only as follows:
>cd... (1 Reply)
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Hi
I need to make some checks inside an awk statement, but cannot come up with the the syntax for several checks under one awk statement, for example:
grep -w ${bits} mydata | awk '{if ($3==1)&&($4==3)&&($5==1) print }'
awk: syntax error near line 1
awk: illegal statement near line 1
In... (3 Replies)
Hello All
I have a xml file with many sets of records
like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
also same file can be like this
<mytag>mydata</mytag>
<tag2>data&</tag2>
<tag3>data2&data3</tag3>
Now i can grep & and replace with & for whole file but it will replace all... (4 Replies)
Hi, I have text file abc.txt. In this file, I have the following data.
Input:
Mr Smith & Mrs Smith
Mr Smith &apos Mrs Smith
Mr Smith & Mrs Smith
Mr Smith& Mrs Smith
Mr Smith &Mrs Smith
Output:
Mr Smith & Mrs Smith
Mr Smith &apos Mrs Smith
Mr Smith & Mrs Smith
Mr Smith&... (4 Replies)
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Hi Guru's.
I am trying to use to check if $5 is greater than 80 & if not 100, then to print $0 :
awk '{ if ($5>80) && if ($5 != 100) print $0}
But getting error:
>bdf1|sed 's/%//g'|awk '{ if ($5>80) && if ($5 != 100) print $0}'
syntax error The source line is 1.
The error... (6 Replies)
Hi All,
Do you have any sample script,
- auto get file from SFTP remote server and delete file in remove server after downloaded.
- only download specify filename
- auto upload file from local to SFTP remote server and delete local folder file after uploaded
- only upload specify filename
... (3 Replies)
Discussion started by: weesiong
3 Replies
LEARN ABOUT DEBIAN
plait
PLAIT(1) User Commands PLAIT(1)NAME
Plait - Command-line Jukebox.
DESCRIPTION
Usage is:
"plait <hint about artist or album or song> [[not] <hint>]...[as <mix>]", or "plait --stream <hint> [[not] <hint>]..."
OPTIONS --list,-l -- show matching tracks but don't play
--mix,-m -- play tracks matching any hint (make a mix)
--queue,-q -- add tracks to queue
--random,-r -- play in random order
--sort-- play in sorted order
--stripe-- play in alternating order
--stripe2-- play in random alternating order
--fade-- play in gaussian fade order
--group-- play randomly in groups
--tracks,-t -- play n tracks, if possible
--stream,-s -- play Shoutcast radio streams
--mixfile,-f -- read hints from mixfile
--device,-d -- choose target device
--platform-- choose platform
--coverart-- cover art mode (0 or 1)
--guest,-g -- use guest configuration
--interactive,-i -- interactive mode
--cache,-c -- rebuild cache
--install-- install Plait
--uninstall-- uninstall Plait
--play
--pause
--stop
--next
--prev
--help-- show help
--version-- show version
AUTHOR
Written by Stephen Jungels (http://stephenjungels.com/contact)
COPYRIGHT
Copyright (C) 2005-2008 by Stephen Jungels. Released under the GPL. Latest version and more info at http://plait.sourceforge.net/
Plait v 1.6.2 September 2008 PLAIT(1)