Sponsored Content
Full Discussion: awk and &&
Top Forums Shell Programming and Scripting awk and && Post 302924587 by Aia on Tuesday 11th of November 2014 12:03:37 AM
Old 11-11-2014
Code:
awk '$2 ~ /artist/ && $4 ~ /play count/ {print $2 FS $4}' FS="\n" RS=  inputfile

This User Gave Thanks to Aia For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk: Version && nextfile

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)
Discussion started by: google
3 Replies

2. UNIX for Dummies Questions & Answers

Problem with xterm & tcsh & sourcing a script in a single command

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)
Discussion started by: sowmya005
1 Replies

3. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

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)
Discussion started by: Zaheer.mic
0 Replies

4. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

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)
Discussion started by: lowmaster
0 Replies

5. Shell Programming and Scripting

awk and &&

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)
Discussion started by: aoussenko
3 Replies

6. Shell Programming and Scripting

replace & with & xml file

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&amp;data3</tag3> Now i can grep & and replace with &amp; for whole file but it will replace all... (4 Replies)
Discussion started by: lokaish23
4 Replies

7. Shell Programming and Scripting

Replace & sign to &amp word

Hi, I have text file abc.txt. In this file, I have the following data. Input: Mr Smith &amp Mrs Smith Mr Smith &apos Mrs Smith Mr Smith & Mrs Smith Mr Smith& Mrs Smith Mr Smith &Mrs Smith Output: Mr Smith &amp Mrs Smith Mr Smith &apos Mrs Smith Mr Smith &amp Mrs Smith Mr Smith&amp... (4 Replies)
Discussion started by: naveed
4 Replies

8. Shell Programming and Scripting

Sort a the file & refine data column & row format

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)
Discussion started by: ckaramsetty
7 Replies

9. Shell Programming and Scripting

awk Help: quick and easy question may be: How to use &&

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)
Discussion started by: rveri
6 Replies

10. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

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
dce_version(8)															    dce_version(8)

NAME
dce_version - print version information for HP DCE/9000 components SYNOPSIS
/opt/dcelocal/etc/dce_version [-uvlG] [-g group_list] [-f version_file] [files ... ] OPTIONS
-u Print a usage message. -v Print DCE version. This is the default behavior. -l List available groups of interesting files. -F Print the name of the default version information file. -G Search files in all groups for what strings. -g group_list Search files in groups specified by group_list for what strings. group_list is a comma or white-space-separated list of group names. The available group names can be listed with -l. -f version_file Specify an alternate version information file to use. The version information file contains the DCE version string and group/file lists. The default version information file is /opt/dcelocal/etc/dce_vinfo. DESCRIPTION
By default, dce_version prints the version of DCE that is currently installed. It can also print the what strings for one or more groups of ``interesting'' DCE files, list the available group names and descriptions, or search any specified file for DCE what strings. More than one action can be specified in a single invocation of dce_version. Filenames to be searched for DCE what strings should be specified after any command line options. FILES
/opt/dcelocal/etc/dce_vinfo SEE ALSO
what(1) HP DCE
dce_version(8)
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy