10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
My sample file is variable length, with out any field delimiters. It has min of 18 chars length and the 'CRLF' is potentially between 12-14 chars. How do I replace this with a space? I still want to keep end of record, but just want to remove these new lines chars in the middle of the data.
... (7 Replies)
Discussion started by: chandrath
7 Replies
2. Shell Programming and Scripting
Does anyone know how to find length of multi dimension array
of following type
A Afor simple array I is to do
for (i in A)n++ to find length of array but if it is multi dimension how to find the length ? (2 Replies)
Discussion started by: nex_asp
2 Replies
3. Programming
Hi all,
We use strlen() fun provided by library to find the length of a string.
Looking inside of it, it has some different mechanism to find the length of string.
Normally, we scan the string byte by byte until the '\0' character. It takes a logn time to count length.
The Library strlen()... (2 Replies)
Discussion started by: yogeshrl9072
2 Replies
4. Shell Programming and Scripting
I would be grateful if someone could help me. I am trying to write a .sh script in UNIX.
I have the following code;
User=john
User=james
User=ian
User=martin
for x in ${User}
do
print ${#x}
done
This produces the following output;
4
5
3
6 (12 Replies)
Discussion started by: mmab
12 Replies
5. Shell Programming and Scripting
Hi all,
I am trying to find the best way of making a change to 1 char in a string, the string can be between 1 and 14 characters.
I am reading a line in from a file which contains
012341231231:2:102939283:NNN: Require :NBN:
012838238232:3:372932:NNN: Require :NNB:
I need to change 1 N or a... (8 Replies)
Discussion started by: nkwilliams
8 Replies
6. Programming
hello all
i am trying to pass a argument through system function to a shell script.
#shell script echo.sh to display the string
echo $1
and the c program is.
#include<stdlib.h>
int
main()
{
const char *str = "hello all";
system("sh echo.sh str");
}
the output i... (5 Replies)
Discussion started by: zius_oram
5 Replies
7. UNIX for Dummies Questions & Answers
HI
In my script, i am reading the input from the user and want to find the length of the string.
The input may contain leading spaces. Right now, when leading spaces are there, they are not counted.
Kindly help me
My script is like below. I am using the ksh.
#!/usr/bin/ksh
echo... (2 Replies)
Discussion started by: dayamatrix
2 Replies
8. Shell Programming and Scripting
how to find the string length in solaris machine. (4 Replies)
Discussion started by: din_annauniv
4 Replies
9. Programming
Can someone provide me with code to md5 hash a string or character array in the SCO environment.
All help is appreciated thanks. (5 Replies)
Discussion started by: jcarter2333
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I know, particular value in the variable should always be of lenth 7 , but the value that is present in thevariable might be of any no.of characters less than or equal to 7... if the no.of characters in the variable is less than 7, I want to add, zeroes at the starting of the field.. How can... (3 Replies)
Discussion started by: thanuman
3 Replies