10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can someone please explain the strange behaviour.. I was just trying a few things to learn awk..
in the below code when I start the braces in the same line, the output is as expected, when I start at next line, output is displayed twice.
Please see the file, code I tried and output below.
... (2 Replies)
Discussion started by: Kulasekar
2. Shell Programming and Scripting
Imagine 2 files f1 f2:
file1_l1_c1 code_to_find file1_l1_c3
file1_l2_c1 file1_code2 file1_l2_c3
file1_l3_c1 file1_code3 file1_l3_c3
file2_l1_c1 file2_l1_c2 code_to_find
file2_l2_c1 file2_l2_c2 file2_code5
file2_l3_c1 file2_l3_c2 file2_code3
Say we want to print lines from f2 having... (5 Replies)
Discussion started by: ripat
3. UNIX for Dummies Questions & Answers
Hi all !
I noticed something very weird.
I have a large pipe delimited file (20 fields/3,000 records) that looks like that:
AAA|BBB|11111|22222|...|($NF of record 1)
CCC|DDD|33333|44444|...|($NF of record 2)
CCC|DDD|55555|66666|...|($NF of record 3)
For the lines with same 1st and 2nd... (3 Replies)
Discussion started by: beca123456
fg = foreground bg = background
I have a cobol program that I start with a very simple script.
The script is not at fault as it has not changed and the program worked in fg and bg before.
I have altered the logging in the program and moved my cursor declare to working storage.
The program runs... (6 Replies)
Discussion started by: Bruble
5. Shell Programming and Scripting
I have the following script :
print "1 ***";
for (i in T) printf("%i:%s ",i,T); print "";
for (i=1; i<=length(T); i++) printf(T); print ""
print "2 ***";
for (i in U) printf("%i:%s ",i,U); ... (3 Replies)
Discussion started by: jgilot
6. UNIX for Advanced & Expert Users
I have snippet like the following
if I say
eval echo \$prompt$x then it is giving o/p "hi"
if I say `eval echo \$prompt$x` here it is giving 1 !
if I add one more escape character i.e.
`eval echo \\$prompt$x` then it is giving "hi"
Can you please... (3 Replies)
Discussion started by: shahnazurs
7. Shell Programming and Scripting
i 've noticed the following difference between freebsd cp and gnu cp
from the freebsd cp man page:
-R ... If the source_file ends in a /, the contents of the directory are copied rather than
the directory itself. ...
on gnu cp from the man pagewhile on gnu cp manpage:
‘-r’... (2 Replies)
Discussion started by: aegis
8. Shell Programming and Scripting
I have a variable, defndata, which is a number (fetched from a file using awk).
I want that if defndata is not initialized (that is its not found in the file using awk), then to execute a block of statements, otherwise execute another block.
Now this... (4 Replies)
Discussion started by: indianjassi
9. Shell Programming and Scripting
Can some-one give me a view to this :
I have a directory in an unix server, having permissions r-xr-xr-x .This directory is basically a source directory.
Now there is another directory basically the destination directory which has all the permissions.
Note:I log in as not the owner,but user... (5 Replies)
Discussion started by: navojit dutta
using namespace std;
const int l_test = 999999999;
int *l_ptr = (int*) &l_test;
cout<<"Constant Addr:"<<&l_test<<" Value:"<<l_test<<endl;
cout<<"Pointer Addr:"<<l_ptr<<" Value:"<<*l_ptr<<endl;
*l_ptr = 888888888; // Manipulating... (2 Replies)
Discussion started by: helpmenow