10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have test.sh file as below :
set -A IDARR $ID
echo | awk -f test.awk -v TempArr="${IDARR
}"
I have test.awk file as below :
BEGIN {
Flag = 1;
}
{
print "Hello";
for(i in TempArr)
{
print i;
}
} (9 Replies)
Discussion started by: nes
9 Replies
2. Shell Programming and Scripting
I have the following code:
print @testarray;
which returns:
8
8
8
9
How do I return the array like this:
The output is: 8, 8, 8, 9 (5 Replies)
Discussion started by: streetfighter2
5 Replies
3. Shell Programming and Scripting
How do you print out a single quote character in AWK? Using the escape character does not seem to work.
{printf "%1$s %2$s%3$s%2$s\n" , "INCLUDE", " \' ", "THIS" }
does not work. Any suggestions? (6 Replies)
Discussion started by: cold_Que
6 Replies
4. Shell Programming and Scripting
I am creating a report in groff and need to format data from a file into a
table cell.
Sample data:
dador,173323,bpt,jsp,39030013338878,1
dador,173323,brew,jsp,39030013338860,1
dador,173323,brew,jsp,39030013339447,1
dador,173323,brew,jsp,39030013339538,1
I would like to build a table... (12 Replies)
Discussion started by: Bubnoff
12 Replies
5. Shell Programming and Scripting
cat a | awk -F";" '{print "update db set column=' "$2" ' where column1=\""$1"\";"}' > ip-add.sql
Hi! I'm a new user!
i've an urgent help on the single apex use in the double apex print string
The apex between che "$2" should not be interpreted, but....how?!
I'm trying to use \ but don't work... (1 Reply)
Discussion started by: Re DeL SiLeNziO
1 Replies
6. Shell Programming and Scripting
Actually I got a list of file end with *.txt
I want to use the same command apply to all the *.txt
Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics.
For example:
I got the file below:
file1.txt
file2.txt
file3.txt... (4 Replies)
Discussion started by: patrick87
4 Replies
7. Shell Programming and Scripting
i want to print ' symbol using awk i tried:
awk '{print " ' "}'
awk '{print "\' "}'
both not work please help me. (2 Replies)
Discussion started by: RahulJoshi
2 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
It is a very stupid problem but I am not able to find a solution to it.
I am using awk to get a column from a file and I want to get the output field in between single quotes. For example,
Input.txt
123 abc
321 ddff
433 dfg
........
I want output file to be as
... (6 Replies)
Discussion started by: gauravgoel
6 Replies
9. Shell Programming and Scripting
How do I access one of the indices in array tst with the code below?
tst=sprintf("%5.2f",Car / 12)
When I scan thru the array with
for ( i in tst ) { print i,tst }
I get the output of:
vec-7 144
But when I try this in the END
print tst
It looks like it's not set.
What am... (6 Replies)
Discussion started by: timj123
6 Replies
10. UNIX for Dummies Questions & Answers
I'm building a file with sql delete statements. I need to print the single quotes for the where clause.
i.e.
delete from Command where CommandName = 'SomeName';
I have the following in my script
input=$(pwd)/Cmnd.csv
i=0
while read line
do
if test $i -ge 1;
then
... (2 Replies)
Discussion started by: orahi001
2 Replies