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. UNIX for Advanced & Expert Users
Hi All,
I have a file which is like below. I need to read all the patterns that starts with P and then replace the 9 digit values to 8 digit values (remove leading integer). Can you please help
Example : ( Please look below File)
File :
P,1
M1,... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies
3. Shell Programming and Scripting
I have a string like
Months=jan feb mar april x y ..
Here the number of fields in Months is not definite
I need to extract each field in the Months string and pass it to awk . Don't want to use for in since it is a loop . How can i do it (2 Replies)
Discussion started by: Nevergivup
2 Replies
4. Shell Programming and Scripting
Hello all,
source file looks like this:
cat toto.txt
NAME)
VAR1=tata
OPT4=toto
USER=blabla
TZ=/usr/share/zoneinfo/Hongkong
OTHEROPT=something
;;
NAME2)
VAR1=tata
OPT4=toto
USER=blabla
TZ=/usr/share/zoneinfo/Hongkong
SOMETHING=else
... (5 Replies)
Discussion started by: maverick72
5 Replies
5. Programming
Hi All
I want to take a Hexadecimal number as input and i want to find lenth of the input and pass it to char s ( char s ). I have a program to convert hexadecial to binary but it is taking limited input but i want to return binary number based on input. How? (1 Reply)
Discussion started by: atharalikhan
1 Replies
6. Shell Programming and Scripting
I have a customer who logged some cc and bank account numbers in their apache logs. I got the cc numbers x'd out with
sed -e 's/args=\{16\}/args=XXXXXXXXXXXXXXXX/g' -e 's/cardnum=\{16\}/cardnum=XXXXXXXXXXXXXXXX/g'but that wasn't too difficult due to the value being 16 digits.
The bank account... (7 Replies)
Discussion started by: mk4mzid
7 Replies
7. Programming
how we can replace char with a string
example
char *a="a.s"
so finally
what i ant to do
raplace a with ant and s sree
so in my array a i want to store the value as "ant.sree"
thank u in advance (1 Reply)
Discussion started by: phani_sree
1 Replies
8. 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
9. Shell Programming and Scripting
Is there a command that sets a variable length?
I have a input of a variable length field but my output for that field needs to be set to 32 char.
Is there such a command?
I am on a sun box running ksh
Thanks (2 Replies)
Discussion started by: r1500
2 Replies
10. Shell Programming and Scripting
:confused: Does anyone know which command I can use to find out the length of a string held within a variable? (5 Replies)
Discussion started by: dbrundrett
5 Replies