10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How does one assign a variable, x to equal the number of records in a different file.
I have a simple command such as below:
awk -F "\t" '(NR>5) { if(($x == "0/0")) { print $0} }' a.txt > a1.txt
but I want x to equal the number of records in a different file, b.txt (10 Replies)
Discussion started by: Geneanalyst
10 Replies
2. Shell Programming and Scripting
I want to assign large number of blanks to a variable in Korn shell. If it is a small number it is fine like if I want to assign 3 blanks I would code
var=" "
But if it is a big number say 100 blanks, what is a better way? Ultimately I will use it in printf statement
printf... (3 Replies)
Discussion started by: Soham
3 Replies
3. Shell Programming and Scripting
Hello,
I am newbie to bash scripting. Could someone help me with the following.
I have log file with output as shown below
**************************LOG*************************
11/20/2013 9:11:23.64 Pinging xx.xx.xx.xx with 32 bytes of data:
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx:... (4 Replies)
Discussion started by: meena_2013
4 Replies
4. Shell Programming and Scripting
Hello Gurus,
Here is my requirement. I need to find the number of lines in a file and need to assign it to a variable. This is what I did and not wroking.
#!/bin/ksh
set -xv
Src_Path=/mac/dev/Generic/SrcFiles
Src_Count=wc -l ${Src_Path}/FILE_JUNE.txt
Count_file = $Src_Count | awk -F... (2 Replies)
Discussion started by: thummi9090
2 Replies
5. Shell Programming and Scripting
Hi,
I am new to unix. I need to insert a variable which contains some lines of text into a text file after fixed number of lines..
Please help me on this..
Thanks in Advance,
Amrutha (3 Replies)
Discussion started by: amr89
3 Replies
6. Shell Programming and Scripting
I have the below script running for generating file from PL/SQL stored procedure. I need to declare a shell variable and then pass this to sqlplus command to pass the same as a INPUT parameter for the stored procedure. Please help to do this.
#!/bin/sh
minlimit=0
maxlimit=10
size=100
while... (0 Replies)
Discussion started by: vel4ever
0 Replies
7. Shell Programming and Scripting
Helo,
I have a kml file with 39.000 lines.
Need search text and add a sequential number before text.
Original file
<Placemark>
<name>POI</name>
<styleUrl>#waypoint</styleUrl>
<Point>
<coordinates>2.104510,41.341900</coordinates>
</Point>
... (3 Replies)
Discussion started by: saba01
3 Replies
8. Shell Programming and Scripting
Hi to all in forum,
I'm trying to convert the letter number between 1 (A) and 26 (Z), that part is working, my issue is how to assign the printf output to a variable:LetterNumber=10
printf "\x$(printf %x $((${LetterNumber}+64)))"
$ J
#The problem, how to assign printf output (J in this... (8 Replies)
Discussion started by: Ophiuchus
8 Replies
9. Shell Programming and Scripting
I have a file with contents similar to this.
abcd
1234
4567
7666
jdjdjd
89289
9382
92
jksdj
9823
298
I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Discussion started by: grajp002
1 Replies
10. Shell Programming and Scripting
Hi all,
I have a file with little blocks beginning with a number 761XXXXXX, and 0, 1, 2 or 3 lines below of it beginning with STUS as follow:
761625820
STUS ACTIVE 16778294
STUS NOT ACTIVE
761157389
STUS ACTIVE 16778294
761554921
STUS ACTIVE 16778294
STUS NOT ACTIVE
STUS ACTIVE OP... (4 Replies)
Discussion started by: cgkmal
4 Replies