Hello, my name is John McPherson. I work as a contractor for the DOL, and I am trying convert some code I maintain in an application to send output files to a printer. Right now, the code( a bash script) just slowly prints the output file on the screen, and the customer wants to have it sent to the printer instead. I work on a 64-bit Oracle( Sun) system with Solaris 11 as the Operating System. I have tried the command lpr -h -l $showfl in the bash script, but that just errors off without printing. I kept searching online …

Member Avatar
Member Avatar
+0 forum 7

Hello, my name is John McPherson. I work for the DOL, in the Uneployment Insurance office, and I am working on an application that uses bash scripts as the controller running the application. I am trying to add a capability to email the output files to the users, which are the states that use the application. The case statement chooses which state to send the email to( or optionally not send an email if state does not want it), is erroring off. I am not sure what the problem is with code. The case statemnet in question is: ## print …

Member Avatar
+0 forum 0

Hi all, i want to write a shell script to unblock sendmail user whose mailbox exceed 100MB

Member Avatar
Member Avatar
+0 forum 1

I have a machine, I have a hosting with FTP. On my venture I found out about `lftp`. And the instructions are here: http://www.dangibbs.co.uk/journal/ftp-sync-usin-linux Snippet is this: open ftp://username:password@website.com mirror -v --only-newer /home/local/path/ /website.com/public_html/ Do these things still work? Also, how do I loop it? I don't want to spam my computer with looping query, and execute 200000 mirrors in a second, when I'll update in 5 next seconds. Is there a way to make it automatic, so that I can leave it in background and let it go, I just want to update my files and have program update …

Member Avatar
Member Avatar
+0 forum 5

Hello everyone, I am trying to merge large number of CSV files into one, using the following "awk" command, but if I increase the number of files more than 10,000, it then gives me "argument too long" error. Can someone suggest how I can manage to go beyond the limit? I am looking to merge some ~100,000 csv files together. awk '{print $0"\t"FILENAME}' *.csv > merged.csv Thanks.

Member Avatar
Member Avatar
+0 forum 5

Will the console prompt ever support unix commands Like in the Apple Terminal?

Member Avatar
Member Avatar
+0 forum 9

I want to write a shell script which finds main() in the given folder files and sub folder files

Member Avatar
Member Avatar
+0 forum 1

Hi group, I'm using VB.net to convert an output file (text) from a Linux based program into a file that will easily read in Notepad. I found some code in VB.net to do this conversion for UNIX that works "OK" (meaning fair but not perfect). It looks like this: txtLine = My.Computer.FileSystem.ReadAllText(RestranName) ' This begins to add the carriage returns in the appropriate places txtLine = Replace(txtLine, vbLf, vbCrLf) txtLine = Replace(txtLine, vbCr & vbCr, vbCr) txtLine = Replace(txtLine, """", "") ' This writes the line to the file My.Computer.FileSystem.WriteAllText(fileSave, txtLine, False) The only issue (it's minor) is that it …

Member Avatar
Member Avatar
+0 forum 1

Group, Some weeks back you helped me solve a formating issue with a text file that originates from a UNIX based program (see [https://www.daniweb.com/software-development/vbnet/threads/489626/remove-end-of-report-line-and-format-unix-text]). While reviewing this newly formated data I saw that a character was place at the beginning of each page. Thus, I assume it does set the next page. However I'd like for you to look and confirm this. But more importantly, I need to know how to insert this character into my code. Because I am merging multiple reports together, I need to add this to the end of each report that is to be merged. …

Member Avatar
Member Avatar
+0 forum 17

Group, I'm now having to merge several of these text files together. At the end of each of the text files is a line that says "End of Report". I need to eliminate this line completely. This code does the merge for me: RestranName = getRestranName(0) RestranName2 = getRestranName(1) System.IO.File.AppendAllText(RestranName2, System.IO.File.ReadAllText(RestranName)) These files are UNIX created and are unformated. So I'm using the following code to format it correctly: ' This reads the text file for conversion txtLine = My.Computer.FileSystem.ReadAllText(RestranName) ' This begins to add the carriage returns in the appropriate places txtLine = Replace(txtLine, vbLf, vbCrLf) txtLine = Replace(txtLine, …

Member Avatar
Member Avatar
+0 forum 12

Microsoft this week acquired [url=http://www.teamprise.com/]Teamprise[/url], a division of [url=http://www.sourcegear.com/]SourceGear[/url] that built tools to give developers access to Visual Studio 2008 Team Foundation Server from systems running Linux, Mac OS X and Unix.SourceGear's flagship [url=http://www.sourcegear.com/sos/]SourceOffSite[/url] provides remote access to Visual SouceSafe, Microsoft's version control system. Teamprise comes in [url=http://www.teamprise.com/products/download/]three forms[/url]. The Plug-in for Eclipse allows developers source control, bug tracking, build and reporting operations from within their current Eclipse environment or Eclipse-based IDE. Teamprise Explorer does the same but can can stand alone. There's also the Command-Line Client automated builds and other scripting situations. Updated to version 3.2 in March, Teamprise …

Member Avatar
Member Avatar
+1 forum 3

I am working on a shell script that takes a single command line parameter, a file path (might be relative or absolute). The script should examine that file and print a single line consisting of the phrase: Windows ASCII if the files is an ASCII text file with CR/LF line terminators, or Something else if the file is binary or ASCII with “Unix” LF line terminators. currently I have tried the following code. #!/bin/sh file=$1 if grep -q "\r\n" $file;then echo Windows ASCII else echo Something else fi #!/bin/sh if test -f "$file" then echo Windows ASCII else echo Something …

Member Avatar
Member Avatar
+0 forum 2

I worked for 20 years in hardware and twenty odd now in software, so change is an old friend. I consult on UNIX/LINUX to a variety of industries, write lots of bits for my own needs, love to help others over their hurdles.

Member Avatar
Member Avatar
+0 forum 1

Basically, I need to make a database viewing page and an input pag...‡ The input page must take the First name, Surname, and the age. This should be sent to a script on your server via either a GET or POST, and inserts them into a MySQL database table. This must be secure against SQL injection. The display page should be generated by another script that pulls out everything from the table, creates a HTML table, and displays it. You may use either apache or Nginx, but any scripting language can be used. Also it's for linux. Thanks for your …

Member Avatar
Member Avatar
+0 forum 3

I have this string " țara " which contains a character ț which is stored on 2 bytes. When i do in linux : hexdump -C file that contains the string it shows : 00000000 c8 9b 61 72 61 |..ara| 00000005 It is normaly to view c8 and 9b ? This isn't the code point in hex of ț . When we take the same string and put it here : [txt_to_hex](http://software.ellerton.net/txt2bin/) We get : 021b 61 72 61 Where 021b is the code point of ț showed in hexa. Why does hexdump shows a wrong result ? c8 …

Member Avatar
Member Avatar
+0 forum 1

Hey guys! I'm in the process of writing a bootloader and I'm having trouble printing out memory information, using 16 bit nasm I know INT 12h stores the low memory information in AX but I can't seem to print it out correctly. I'm currently trying to print it by converting to ascii, moving it into a string and printing it with INT 10h but right now I just get ASCII smiley faces. Can I get a snippet of asm on how to print the contents of AX to the screen? Thanks

Member Avatar
Member Avatar
+0 forum 6

Hi, Is there any way in C++ to select and read the last modified file from a unix directory? Let say the o/p of the ls -t is : abc.txt myfile.txt .... .... last_file.txt I want to select this last file ( can be of any name) and read the same using C++. Thanks in advance for your quick help. Thanks, Parvez

Member Avatar
Member Avatar
+0 forum 16

Hello, I have one "**tar.Z**" file. Objective is to unzip it by shell script and check the date. * archive: filename_20140103_1540.tar.Z #!/bin/bash cd $REP_DATAS/path u=$(date +%u) if [ ${u} -eq 1 ] ; then dateQ=`date --date='-3 day' +'%Y%m%d_%H%m'` else dateQ=`date --date='-1 day' +'%Y%m%d_%H%m'` fi tar xvf filename_"dateQ".tar.Z > error: > > tar: Error is not recoverable: exiting now THANKS IN ADVANCED.

Member Avatar
Member Avatar
+0 forum 14

A program which has the main process as Director process, which reads a file containing marks of all quizzes of all sections and creates x number of Manager processes. Each Manager process will take care of solving for a section. Each manager process will create y number of worker process and pass one quiz to each of them and they calculate and print the average. HINTS There are x number of sections in a course. In each section y numbers of quizzes are conducted. The average for each quiz in all the sections needs to be found out. Read x …

Member Avatar
Member Avatar
+0 forum 2

Similar to echoserver, but this one handles multiple clients by forking the process.

Member Avatar
+0 forum 0

This is a simple echo server that I've written while learning sockets programming. Compile the server and run it. You can connect to it using telnet like this: telnet localhost 1337 Disconnect the client by typing "/quit" without quotes.

Member Avatar
+0 forum 0

I want to write a C code that reads billions of integers from a text file. Each integer is of length 10 digits (e.g. -2311872000). then I build a linked list to store these integers.how could I do that ?

Member Avatar
Member Avatar
+0 forum 7

Hi I have just replied on a post that was posted 43 years ago. My reply was also 43 years ago. I had that feeling that time just flies lately but this might be a little too fast. Or is it just some issue with unix time. This is the link to the article. http://www.daniweb.com/web-development/php/threads/461757/feedback-system-phpmysql#post2008638 EDIT: it is back to normal. I was just extremely lucky to whitnes this extraordinary event for a very short time.

Member Avatar
Member Avatar
+1 forum 8

How can I open an application on a specific workspace using the terminal in UNIX? **** I cannot use any external addons like Devil's Pie ****

Member Avatar
+0 forum 0

Im trying to add Total function and isMono functions to this code. Did total already Need help with function ismono which returns whether a tree is mono (all the elements are unique aka no element appears more than one time) or not. Please this is the original program #ifndef T_H #define T_H #include <iostream> #include <iomanip> using namespace std; struct tnode { int info ; int count; tnode * right, *left; }; tnode * insert(int target,tnode * t); tnode * makenode(int x); tnode * tsearch(int x,tnode * t); void inorder(tnode * t); int height(tnode * t); int count(tnode * t) …

Member Avatar
Member Avatar
+0 forum 2

Hi, I need a function that will take a tree as argument and return the number of ints that were typed and a correct call. would it just be preorder? like below. Please. Thanks #include "t.h" void preorder(tnode * t){ if (t == NULL) return; cout << t->info <<endl; preorder(t->left); preorder(t->right); } call would be preorder(t).

Member Avatar
Member Avatar
+0 forum 2

Hi Can anyone explain me the following command. This may be a minor one, but, please do explain in detail. CHKTRANS=`echo ${0} | grep '/transforms/' | wc -l`

Member Avatar
Member Avatar
+0 forum 10

Hi. I have a noobish UNIX question. I have a password-protected section of my website for testing (named 'sandbox') and I'm trying to write output to a plain text file in that directory. But I'm getting the following error due to permissions settings. `Warning: file_put_contents(testdb.txt) [function.file-put-contents]: failed to open stream: Permission denied in /Applications/XAMPP/xamppfiles/htdocs/sandbox/dbtest1.php on line 5` I'm sure it's something simple, but what could I be overlooking?

Member Avatar
Member Avatar
+0 forum 5

Hi all I want to login a machine remotely and doing some operation on the remote machine and then exit the remote machine by a unix shell script. I can login these two machines without passward. How can I do that? For example, my script is on machine1. that script remotely login to machine2 and do some operation on machine2. After doing that it exits machine2 and back to machine1. I had tried with this script from a machine1 #!/bin/bash clear ssh -Y sudipta@machine2.chem.udel.edu <<EOF echo 'welcome machine2' EOF However, it is giving '**Pseudo-terminal will not be allocated because stdin …

Member Avatar
Member Avatar
+0 forum 3

linux and unix

Member Avatar
Member Avatar
-1 forum 3

The End.