Sponsored Content
Full Discussion: && meaning in UNIX
Top Forums UNIX for Beginners Questions & Answers && meaning in UNIX Post 302966004 by jim mcnamara on Saturday 6th of February 2016 05:06:25 AM
Old 02-06-2016
In an awk script or a shell script it is used as a logical and operator:
awk :
Code:
if ($1=="A" && $2=="B") {print $3}

In shell command lines (or scripts) it is also used to create a multiple statement.
It tests the return code of the previous statement, and if it returns OK which in shell is 0, then it does the next step
Example: if directory a exists, list it
Code:
[ -d a ] && ls a

This User Gave Thanks to jim mcnamara For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

what is the difference between Unix & linux, what are the advantages & disadvantages

ehe may i know what are the difference between Unix & Linux, and what are the advantages of having Unix as well as disadvantages of having Unix or if u dun mind i am dumb do pls tell me what are the advantages as well as the disadvantages of having linux as well. thanks (1 Reply)
Discussion started by: cybertechmkteo
1 Replies

2. UNIX for Dummies Questions & Answers

meaning of .& in shell

Hi , can anyone explain me the meaning of following line ". &13FNAME/version_encours/cfg/dfm.cfg" Regards (1 Reply)
Discussion started by: scorpio
1 Replies

3. Shell Programming and Scripting

meaning of & in sh shell

All, I have a line in my code like below , could any one please tell me what this actually mean what is the & doding there. I am in sh shell #!/bin/sh .............. mv &fname &III.tar.gz Thanks in Advance, Arun (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

4. Shell Programming and Scripting

Meaning of >&2

What does >&2 at the end of the statement echo "Alright man..." >&2 mean? (4 Replies)
Discussion started by: proactiveaditya
4 Replies

5. 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

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

meaning of &1

All, In the below mentioned line --- $SCRIPT_FILES/wrapper_sleep.ksh > $MVXREFLOG 2>&1 what is the meaning of &1 here. Regards Oracle User (2 Replies)
Discussion started by: Oracle_User
2 Replies

9. Shell Programming and Scripting

How to write If statement using && and operator in Unix

Hi What is the syntax for if statement using && and || operator? if && ] || here its giving me an error to this if statement any suggestion?? (2 Replies)
Discussion started by: Avi
2 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
FcPatternBuild(3)														 FcPatternBuild(3)

NAME
FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild - Create patterns from arguments SYNOPSIS
#include <fontconfig.h> FcPattern * FcPatternBuild (FcPattern *pattern, ...); FcPattern * FcPatternVaBuild (FcPattern *pattern, va_list va); void FcPatternVapBuild (FcPattern *result, FcPattern *pattern, va_list va); DESCRIPTION
Builds a pattern using a list of objects, types and values. Each value to be entered in the pattern is specified with three arguments: 1. Object name, a string describing the property to be added. 2. Object type, one of the FcType enumerated values 3. Value, not an FcValue, but the raw type as passed to any of the FcPatternAdd<type> functions. Must match the type of the second argu- ment. The argument list is terminated by a null object name, no object type nor value need be passed for this. The values are added to `pat- tern', if `pattern' is null, a new pattern is created. In either case, the pattern is returned. Example pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0); FcPatternVaBuild is used when the arguments are already in the form of a varargs value. FcPatternVapBuild is a macro version of FcPat- ternVaBuild which returns its result directly in the result variable. VERSION
Fontconfig version 2.9.0 16 April 2012 FcPatternBuild(3)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy