10-10-2011
What is that 'xargs' on the end supposed to do? xargs is used to run other commands but you give it no arguments at all.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Question for anyone that might be able to help:
My objective is to eheck if a file (a source file) exists in a directory. If it does then, I'd like to call an application (Informatica ETL file...not necessary to know) to run a program which extracts data and loads it into multiple targets.
... (6 Replies)
Discussion started by: jnanasakti
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'd like to process multiple files. For example:
file1.txt
file2.txt
file3.txt
Each file contains several lines of data. I want to extract a piece of data and output it to a new file.
file1.txt ----> newfile1.txt
file2.txt ----> newfile2.txt
file3.txt ----> newfile3.txt
Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have two unix server. In one server clearcase is installed. I want to take files from one server to clearcase server. Could anyone help to start up this, for how to connect clearcase server from my main server. ??
Currently am having IP address of that clearcase server.
Thanks in... (0 Replies)
Discussion started by: ckchelladurai
0 Replies
4. Shell Programming and Scripting
Hi Experts,
I am checking how to get day in Perl.
If it is “Monday” I need to process…below is the pseudo code.
Can you please prove the code for below condition.
if (today=="Monday" )
{
while (current_time LESS THAN 9:01 AM)
... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies
5. Shell Programming and Scripting
I have multiple files:
file1:
one
two
three
file2:
two
four
six
file3:
one
two
ten
These are all in a directory called dir1 (5 Replies)
Discussion started by: castrojc
5 Replies
6. Shell Programming and Scripting
I want to check if any file with testing*.txt exists but my script fails if more than 1 file exists. It works fine for a single file
if
then
echo "TEST21"
fi
--------------
bash:
How do I fix this?
Thanks
Please use code tags next time for your code and data. (8 Replies)
Discussion started by: sumang24
8 Replies
7. Post Here to Contact Site Administrators and Moderators
A recent post is hijacking a thread on a completely unrelated topic. Any help you can provide in moving this posting to a new thread (or at least removing it from the current thread) would be greatly appreciated.
Thanks,
Don (1 Reply)
Discussion started by: Don Cragun
1 Replies
8. Shell Programming and Scripting
I am passing multiple files in awk & since one of the file is empty(say file3) so the same gets skipped & logic goes for toss. Need suggestion/help in checking and putting additional checks for the same
awk -F, 'FNR==1 {++filecounter}
filecounter==1 {KRL=$2;next}
filecounter==2... (8 Replies)
Discussion started by: siramitsharma
8 Replies
9. Shell Programming and Scripting
Hi All,
I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results.
#!/bin/ksh
(
a="/path/file1"
b="path/file2"
for file in... (4 Replies)
Discussion started by: am24
4 Replies
LEARN ABOUT LINUX
lgrp_init
lgrp_init(3LGRP) lgrp_init(3LGRP)
NAME
lgrp_init - initialize lgroup interface
SYNOPSIS
cc [ flag... ] file... -llgrp [ library... ]
#include <sys/lgrp_user.h>
lgrp_cookie_t lgrp_init(lgrp_view_t view);
The lgrp_init() function initializes the lgroup interface and takes a snapshot of the lgroup hierarchy with the given view. If the given
view is LGRP_VIEW_CALLER, the snapshot contains only the resources that are available to the caller (for example, with respect to processor
sets). When the view is LGRP_VIEW_OS, the snapshot contains what is available to the operating system.
Given the view, lgrp_init() returns a cookie representing this snapshot of the lgroup hierarchy. This cookie should be used with other rou-
tines in the lgroup interface needing the lgroup hierarchy. The lgrp_fini(3LGRP) function should be called with the cookie when it is no
longer needed.
The lgroup hiearchy represents the latency topology of the machine. The hierarchy is simplified to be a tree and can be used to find the
nearest resources.
The lgroup hiearchy consists of a root lgroup, which is the maximum bounding locality group of the system, contains all the CPU and memory
resources of the machine, and may contain other locality groups that contain CPUs and memory within a smaller locality. The leaf lgroups
contain resources within the smallest latency.
The resources of a given lgroup come directly from the lgroup itself or from leaf lgroups contained within the lgroup. Leaf lgroups
directly contain their own resources and do not encapsulate any other lgroups.
The lgroup hierarchy can be used to find the nearest resources. From a given lgroup, the closest resources can be found in the lgroup
itself. After that, the next nearest resources can be found in its parent lgroup, and so on until the root lgroup is reached where all the
resources of the machine are located.
Upon successful completion, lgrp_init() returns a cookie. Otherwise it returns LGRP_COOKIE_NONE and sets errno to indicate the error.
The lgrp_init() function will fail if:
EINVAL The view is not valid.
ENOMEM There was not enough memory to allocate the snapshot of the lgroup hierarchy.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
lgrp_children(3LGRP), lgrp_cookie_stale(3LGRP), lgrp_cpus(3LGRP), lgrp_fini(3LGRP), lgrp_mem_size(3LGRP), lgrp_nlgrps(3LGRP), lgrp_par-
ents(3LGRP), lgrp_resources(3LGRP), lgrp_root(3LGRP), lgrp_view(3LGRP), liblgrp(3LIB), attributes(5)
26 Jan 2005 lgrp_init(3LGRP)