02-26-2020
Thank you for being so quick and fair in your answers
The 1st proposition works perfectly. the second almost except that for the servers not found, there is this:
;; reached
( you can send me a other command line if you want )
in any case to you two
just for knowledge, could it have been done with cat grep and cut?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am trying to cat a file and then grep that file for a number. I can do it fine on other files but this particular file will not do anything. I tried running it on an older file from the same device but it is just not working. The file is nothing more than a flat file on a unix box. Here is just a... (3 Replies)
Discussion started by: jphess
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
This is what I am trying to do.
1) connect to 3 remote servers from my local machine
serverA serverB serverC
2) read error file from each server
cat /var/lib/mysql/mydb.err
3) grep for lines displaying "yesterday" date
grep "`date +%y%m%d' '-d\"1 day ago\"`"
4) Append those lines to a... (7 Replies)
Discussion started by: shantanuo
7 Replies
3. Shell Programming and Scripting
Hi,
Im a pretty large noob to linux/perl etc and im trying to use mysql slurp to take a delimited file and import it into mysql using stdin (in the hope its faster)
mysqlslurp - slurp <STDIN> into a MySQL table - search.cpan.org
Christopher Brown / MySQL-Slurp - search.cpan.org
Using... (3 Replies)
Discussion started by: newtony
3 Replies
4. Shell Programming and Scripting
Hi All,
I'd like to do this
cat /etc/passwd
and grep -v on the /etc/shells list
I'd like to find all shell that doesn't exist on the /etc/passwd.
Is there an easy way without doing a egrep -v "/bin/sh|/bin/bash................"?
How do I use a file /etc/shells as my list for... (4 Replies)
Discussion started by: itik
4 Replies
5. Shell Programming and Scripting
I am not sure if using cat -n is the most efficient way to split a file into multiple files, one file per line in the source file.
I thought using cat -n would make it easy to process the file because it produces an output that numbers each line that I could then grep for with the regex "^ *$i".... (3 Replies)
Discussion started by: kapu
3 Replies
6. Shell Programming and Scripting
Is there a way using grep or cat a file to create a new file based on whether the first 9 positions of each record is less than 399999999?
This is a fixed file format. (3 Replies)
Discussion started by: ski
3 Replies
7. Slackware
not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell.
but how must the command be?
grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d
the delimeter is just a space. can you help meplease. :D (1 Reply)
Discussion started by: garfish
1 Replies
8. UNIX for Dummies Questions & Answers
Hello,
i need to search one word (snp1) from many files and copy the content of the columns of this word in new file.
example:
file 1:
SNP BP CHR P
snp1 1 3 0.01
snp2 2 2 0.05
.
.
file 2:
SNP BP CHR P
snp1 1 3 0.06
snp2 2 2 0.3
output... (6 Replies)
Discussion started by: biopsy
6 Replies
9. Shell Programming and Scripting
Hello
someone told me to use
OS=`awk '{print int($3)}' < /etc/redhat-release`
instead of
OS=cat /etc/redhat-release | `awk '{print int($3)}'`
any idea for the reason ? (5 Replies)
Discussion started by: nimafire
5 Replies
10. UNIX for Dummies Questions & Answers
Hi Guys
This is my first post so I am not sure how things go here. I'm sorry if I'm breaking the rule or something. Feel free to correct me about that :)
So as I was saying...
I'd been trying to grep this folder containing 900,000 txt files but seems no luck. I get either "No such file... (6 Replies)
Discussion started by: Nexeu
6 Replies
LEARN ABOUT OSX
xbssnapshot
XBSSNAPSHOT(1) CoreXBS Tools XBSSNAPSHOT(1)
NAME
xbssnapshot - CoreXBS snapshot utility
SYNOPSIS
xbssnapshot fetch [--[no]live] [--age hours] [--[no]xpc] train_name
xbssnapshot authcheck [--timeout seconds] train_name
DESCRIPTION
In the 1st form, xbssnapshot is used to obtain a snapshot of Cortex for train_name. A cache of snapshots is maintained in a directory,
which may or may not be used in addition to consulting the Cortex servers depending on command line OPTIONS specified. If successful, a
file URL of a suitable snasphot is printed to STDOUT. On failure, a description of the failure is printed to STDERR.
In the 2nd form, xbssnapshot is used to check connectivity to the Cortex servers for train_name and determine if AppleConnect (Single
Sign-On) credentials will be required to obtain a snapshot. If the Cortex server can be reached, YES is printed to STDOUT if SSO authenti-
cation is required and NO is printed if not. On failure (including not being able to reach the Cortex servers), a description of the fail-
ure is printed to STDERR.
OPTIONS
--live Force xbssnapshot to bypass the snapshot cache directory and fetch data from Cortex.
--nolive
Force xbssnapshot to not fetch data from Cortex and only use the snapshot cache directory.
--age hours
When considering if a snapshot found in the snapshot cache directory is "new enough", only accept snapshots that are less than hours
old.
--xpc Use XPC service when fetching data from Cortex. This is the default.
--noxpc
Bypass XPC service when fetching data from Cortex.
--timeout seconds
When performing connectivity test with Cortex server(s), how long to wait before assuming no connectivity to a given Cortex server.
RETURN VALUES
Returns 0 on success, and non-zero on failure.
ENVIRONMENT
CTXHost
May be set to the hostname of a specific Cortex server. This is mainly only useful to the developers.
CTXPort
May be set to specific port to connect to CTXHost on (does nothing unless CTXHost is also set). This is mainly only useful to the
developers.
FILES
/Library/Caches/com.apple.bni.cortexsnapshot
Directory where snapshots are cached.
/var/log/system.log
CoreXBS framework and XPC services log here. grep CoreXBS /var/log/system.log may show additional information above and beyond what
xbssnapshot prints on it's own.
BUGS
If you encounter issues with xbssnapshot, please file a Radar. Component is "CBL - CoreXBS|X". Please include the following information, if
possible:
1. Output of xbssnapshot, including command line it was invoked with.
2. Output of ls -lh /Library/Caches/com.apple.bni.cortexsnapshot
3. Output of grep CoreXBS /var/log/system.log
4. If a snapshot was fetched, a copy of the snapshot.
AUTHOR
Problems with xbssnapshot should be addressed via Radar (see BUGS). For discussion and advice from other users please subscribe to
xbs-help@group.apple.com. The maintainers of xbssnapshot are cbt@group.apple.com. Suggestions and comments are always welcome!
Core Build Technologies March 2013 XBSSNAPSHOT(1)