nawk is truncating output
Legends, I have 2 files f1 and f2. when i use nawk to compare the difference(subtraction) from 4th column of the file, it truncates the output. can you please help to resolve this. subtraction is (4th...
View Articledate time stamps in bash
I'm looking for a way to have the "date" command output the date in a specific format. I'm not familiar with the different ways to use the date command at all. i read up on it, but i dont get how to...
View Articlephp script "$GET"
Hi, i have php script to show the page per row 10, the script working fine in windows. but when i try use in linux machine getting error. "Notice: Undefined variable: halaman in...
View Articlewhat is the name of this piece of code
Code: while ((numRead = read(inputFd, buf, BUF_SIZE)) > 0) if (write(outputFd, buf, numRead) != numRead) fatal("couldn't write whole buffer"); if (numRead == -1) errExit("read"); if (close(inputFd)...
View ArticleMakefile help
I am creating a make file, but i keep getting an error when i try to run it with the following code: Code: make foo . make $(EXE) i get Code: EXE: command not found make: `foo' is up to date. make:...
View ArticleMerge two files by condition
I have two files as below A file Code: /* comment for id1 */ "id1" = "x1" /* comment for id2 */ "id2" = "x2" /* comment for id3 */ "id3" = "x3" B file Code: /* comment for id1 */ "id1" = "y1" /*...
View Articlehow to get all files on a directory of .c file
i need to get all files names on a c file directory to I can open every file and read from them to write on other files...... I solved the problem of reading and writing for a specific file to another...
View Articleprogram to find and print a Fibonacci sequence of numbers. --Errors
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to...
View ArticleBenefit of Kernel
So I was wondering what are the benefits of Unix kernel? It does Process Management, File Management, Main Memory Management and Disk Management! Why couldn't operating system take care of these...
View Articlewhat is the main difference between difference between using nonatomic lseek...
I think both write at the end of the file ...... but is there a sharp difference between those 2 instruction ..... thank you this is my 3rd question today forgive me :D
View ArticleWget JPG not working
Hi, I am new to Unix. Actually, I am using Terminal from MAC OSX Snow Leopard. I have installed XCode and wget 1.14 today. I just want to download all of the jpg files from a specific blog (from...
View Articlecreate txt file form data file and add some line on it
Hi Guys, I have file A.txt Code: File A Data AK1521 AK2536 AK3164 I want create text file of all data above and write some data on each file. want Output on below folder /home/kka/out Code: AK1521.txt...
View Articlefor loop using {1..$t}
I read here: Bash For Loop Examples that I should not use seq , instead use {1..10} I am not getting this to work old code Code: #!/bin/bash t=$(cat /var/bin/servers | wc -l) for c in $(seq 1 $t)...
View Articlehelp plz - fopen()
Hello, I have a problem here, I want to write a function called"myfopen()" instead of "fopen()" for writing this function I must not use the <stdio.h> library, Can you help me? thanks a lot
View ArticleKSH fetching files from server A onto server B and putting on server C
Dear Friends, Sorry for this basic request. But I just started learning Ksh recently and still I am a newbie in this field. Q: I have files on one server and the date format is 20121001000009_224625.in...
View Articlenanobsd
hi friends can any one explain these for me : CONF_BUILD CONF_INSTALL CONF_WORLD and these WITHOUTs : PHP Code: http://phk.freebsd.dk/misc/build_options_stable_8_210741/ thanks
View Articlesplit continues lines to separated section with conditions
Hello; i have a file contains N continues records. i want to split these lines to some separate sections with each lines of a section has the desired condition compared to other sections input: Code:...
View ArticleEXPECT: Assign variable by reading a line of text from a file
Hi All, I have been using a program on windows called AutoKey. My environment at work is Linux and I have been experimenting with expect. Very powerful. I can move my AutoKey scripts to Linux using...
View ArticleReplace date on a line with current date
Hi Guys, I have a file with following content Code: From 20121014 : To 20121014 Number of days : 1 1234 1245 1246 1111 Everyday i run my script i want to modify "To" date on the first line with current...
View ArticleBackup to a remote tape device. Is it possible?
Hi all The situation is as follows: We need to take an mksysb image from an AIX 6.1 server. From some reason (irrelevant to this discussion) this server does not have access to a local CD-ROM or a tape...
View Article