10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. 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
6. 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
7. 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
8. 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
9. 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
10. 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