08-06-2009
Hi Peterro,
Thanks a lot for your time!It worked!
Great!
Regards,
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm looking to create a Korn Shell script that, if given a directory as an arg, will calc bytes used by all files in the given directory and display that info. If no command line arg is given the program is to calc and display the bytes used by all the files in the pwd.
Example output:
... (3 Replies)
Discussion started by: kecannon
3 Replies
2. Shell Programming and Scripting
Situation: I have a working shell script on our file server (OSXS Tiger) to connect to a workstation, which is using a portable home directory (phd), and rsync a user's MirrorAgent.log. I'm not that strong of a scripter (obviously), but I would like to add other workstations to this script as they... (4 Replies)
Discussion started by: le0pard13
4 Replies
3. Shell Programming and Scripting
if ( ( grep -i "Exception : " /home/dklog* ))
then
echo " improper combination"
elsif ( ( grep -i "invalid" /home/dklog*))
then
echo " wrong process "
fi
fi
in the above case i am facing the the syntx error
please help in this case... (3 Replies)
Discussion started by: mail2sant
3 Replies
4. Shell Programming and Scripting
Hi all,
Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this?
Your help is greatly appreciated!!
Best Regards,
Naveen. (1 Reply)
Discussion started by: naveendronavall
1 Replies
5. Shell Programming and Scripting
Hi,
on unix box, under /local/home/userid/logs folder, apps generated the following files
sw_warn.log
sw_error.log
eaijava.log
if there any application specific errors, the above file will keep growing.
if the file exceed 5000000 bytes, I would like to have a shell script which do... (6 Replies)
Discussion started by: lookinginfo
6 Replies
6. Shell Programming and Scripting
I have a shell script which I made with the help of this forum
#!/bin/sh
RuleNum=$1
cat bw_rules | sed 's/^.*-x //' | awk -v var=$RuleNum '$1==var {for(i=1;i<=NF;i++) {if($i=="-bwout") print $(i+3),$(i+1)}}'
Basically I have a pages after pages of bandwidth rules and the script gives... (0 Replies)
Discussion started by: sb245
0 Replies
7. Programming
Hi,
If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script.
dd bs=1024 count=3 if=/src of=/dest
But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Discussion started by: royalibrahim
3 Replies
8. Shell Programming and Scripting
how to convert these code to shell script
#include<stdio.h>
#include<conio.h>
main()
{
int
i,j,a=0,b=0,c=0,f,t,al,ta;
int a1, max, n, n1,p,k=0;
printf(“\n enter no.of resources”);
scanf(“%d”,n1);
printf(“\nenter the max no .of resources for each type”);
for(i=0;i<n1;i++)... (4 Replies)
Discussion started by: syah
4 Replies
9. UNIX for Dummies Questions & Answers
Hello guys. I really hope someone will help me with this one..
So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Discussion started by: razolo13
1 Replies
10. Shell Programming and Scripting
hello,
suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly.
example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly.
enter your name:
donald duck (this is of 11 bytes)
expected is as below - display 11... (3 Replies)
Discussion started by: shravan.300
3 Replies
LEARN ABOUT SUSE
__skb_recv_datagram
__SKB_RECV_DATAGRAM(9) Linux Networking __SKB_RECV_DATAGRAM(9)
NAME
__skb_recv_datagram - Receive a datagram skbuff
SYNOPSIS
struct sk_buff * __skb_recv_datagram(struct sock * sk, unsigned flags, int * peeked, int * err);
ARGUMENTS
sk
socket
flags
MSG_ flags
peeked
returns non-zero if this packet has been seen before
err
error code returned
DESCRIPTION
Get a datagram skbuff, understands the peeking, nonblocking wakeups and possible races. This replaces identical code in packet, raw and
udp, as well as the IPX AX.25 and Appletalk. It also finally fixes the long standing peek and read race for datagram sockets. If you alter
this routine remember it must be re-entrant.
This function will lock the socket if a skb is returned, so the caller needs to unlock the socket in that case (usually by calling
skb_free_datagram)
* It does not lock socket since today. This function is * free of race conditions. This measure should/can improve * significantly datagram
socket latencies at high loads, * when data copying to user space takes lots of time. * (BTW I've just killed the last cli in
IP/IPv6/core/netlink/packet * 8) Great win.) * --ANK (980729)
The order of the tests when we find no data waiting are specified quite explicitly by POSIX 1003.1g, don't change them without having the
standard around please.
COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 __SKB_RECV_DATAGRAM(9)