05-31-2019
You need a lot more than an
if statement to do what you want to do. And, if you want our help we will need a lot more information:
- What operating system are you using?
- What shell are you using?
- What are the formats of files FileA and FileB?
- Can you show us a representative sample of the contents of FileA and FileB and show us the results you hope to get when processing those two sample files?
- And, most importantly, please show us what you have tried to solve this problem on your own.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
How can i compare a string using if statement in a script?
For eg:
I have
filename="abc.sh"
if ;then
{
.......
.......
}
fi
but this doesnot work .. How will i execute this ??
Thanks in advance (1 Reply)
Discussion started by: jisha
1 Replies
2. Shell Programming and Scripting
I am writing a script that ssh's out to our various servers and extracts diskspace info to generate into a report. With the mix of servers linux/solairs 8-10/AIX the easiest way is to use df -k (though I much rather prefer df -h).
I have pasted the relevant code:
dfdata=`ssh -q -o... (1 Reply)
Discussion started by: rkruck
1 Replies
3. Shell Programming and Scripting
Here is my situation. I need to compare two tab separated files (diff is not useful since there could be known difference between files).
I have found similar posts , but not fully matching.I was thinking of writing a shell script using cut and grep and while loop but after going thru posts it... (2 Replies)
Discussion started by: blackjack101
2 Replies
4. Shell Programming and Scripting
I have the following simplified code that I am planning on putting into a larger shell script. I have been butchering it to try and make work amongst google searches and reading awk documentation.
amixer sset Master toggle | awk '{ if ( /^ Front Left/ { print $7 } == // ) print "MUTED" }'I... (2 Replies)
Discussion started by: jelloir
2 Replies
5. Debian
I'm just interested to know how your sources.list look like. I got some repositories witch give some errors and I would like to clean it up.
and when I do apt-get update I get few lines showing errors like 404 , this is how my list look like:
# deb cdrom:/ squeeze main
# deb cdrom:/... (0 Replies)
Discussion started by: zdorian
0 Replies
6. Linux
Hi,
Is it possible to convert MD5 passwords to SHA-512?
I'm about to migrate an old slackware server to Debian, then I noticed that they don't use same encryption method.
I'm aware that I can change the encryption method in Debian to MD5, but as far as I understand SHA-512 is more secure,... (2 Replies)
Discussion started by: urandom
2 Replies
7. Shell Programming and Scripting
DEV> vi test_if_statement.sh
"test_if_statement.sh" 9 lines, 205 characters
proc_out="Normal completion"
proc_out_comp="Normal completion"
echo 'proc_out:'$proc_out
echo 'proc_out_comp:'$proc_out_comp
if then
echo 'match'
else
echo 'no_match'
fi
~
~
~
~
~
~
~
~
~ (4 Replies)
Discussion started by: cartrider
4 Replies
8. UNIX and Linux Applications
Is it possible to use {SHA} with ldappasswd? I didn't find responsible option in manual page and doc (1 Reply)
Discussion started by: urello
1 Replies
9. AIX
Hello Guys,
I was trying to have an SHA256 encryption which further be encrypted into base 64 using AIX unix command shasum -a 256.
What I found in this is my output is different than a website: "online-convertcom"
Actually conversion from website is exactly matching my requirements but... (4 Replies)
Discussion started by: Krunal Patel
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am trying to do the following to see if "ip" is already present in a file.
if ; then
echo "hi"
else
echo "hello"
fi
I am seeing errors on the if statement. Can someone please correct the syntax for me? Thanks (2 Replies)
Discussion started by: waince
2 Replies
LEARN ABOUT SUNOS
wanboot_keygen
wanboot_keygen(1M) System Administration Commands wanboot_keygen(1M)
NAME
wanboot_keygen - create and display client and server keys for WAN booting
SYNOPSIS
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=3des
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=aes
/usr/lib/inet/wanboot/keygen -m
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=sha1
/usr/lib/inet/wanboot/keygen -d -m
/usr/lib/inet/wanboot/keygen -c -o net=a.b.c.d ,cid=client_ID,type=keytype
DESCRIPTION
The keygen utility has three purposes:
o Using the -c flag, to generate and store per-client 3DES/AES encryption keys, avoiding any DES weak keys.
o Using the -m flag, to generate and store a "master" HMAC SHA-1 key for WAN install, and to derive from the master key per-client HMAC
SHA-1 hashing keys, in a manner described in RFC 3118, Appendix A.
o Using the -d flag along with either the -c or -m flag to indicate the key repository, to display a key of type specified by keytype,
which must be one of 3des, aes, or sha1.
The net and cid arguments are used to identify a specific client. Both arguments are optional. If the cid option is not provided, the key
being created or displayed will have a per-network scope. If the net option is not provided, then the key will have a global scope. Default
net and code values are used to derive an HMAC SHA-1 key if the values are not provided by the user.
OPTIONS
The following options are supported:
-c
Generate and store per-client 3DES/AES encryption keys, avoiding any DES weak keys. Also generates and stores per-client HMAC SHA-1
keys. Used in conjunction with -o.
-d
Display a key of type specified by keytype, which must be one of 3des, aes, or sha1. Use -d with -m or with -c and -o.
-m
Generate and store a "master" HMAC SHA-1 key for WAN install.
-o
Specifies the WANboot client and/or keytype.
EXAMPLES
Example 1: Generate a Master HMAC SHA-1 Key
# keygen -m
Example 2: Generate and Then Display a Client-Specific Master HMAC SHA-1 Key
# keygen -c -o net=172.16.174.0,cid=010003BA0E6A36,type=sha1
# keygen -d -c -o net=172.16.174.0,cid=010003BA0E6A36,type=sha1
Example 3: Generate and Display a 3DES Key with a Per-Network Scope
# keygen -c -o net=172.16.174.0,type=3des
# keygen -d -o net=172.16.174.0,type=3des
EXIT STATUS
0
Successful operation.
>0
An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWwbsup |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO
attributes(5)
SunOS 5.10 18 Apr 2003 wanboot_keygen(1M)