Programming :: Print The Current Time Of My System With A Batch File ?

Dec 25, 2010

How can I print the current time of my system with a batch file. My os is ubuntu.

View 4 Replies


ADVERTISEMENT

Programming :: Iterate Through The File And Print The Different Columns Each Time?

Nov 27, 2010

How do I do this?The script below obviously dosn't work.

#!/bin/bash
for u in $(awk '{print $2}' user.txt)
for i in $(awk '{print $1}' user.txt)

[code]...

One text file with two columns in it, I need to iterate through the file and print the different columns each time

View 9 Replies View Related

Programming :: Get The Current Time As Provided From NTP (not The Currently Set Time On The Server)?

Jun 9, 2010

Is there a way to get the current time as provided from NTP (not the currently set time on the server)?

View 4 Replies View Related

Programming :: Batch File To Run Unix Commands From Windows?

Nov 22, 2010

I need to write a windows batch file to run unix commands by logging onto a telnet unix server. For example , I might want the batch file to log onto the unix sever, run the ls command, collect the output in a file and ftp it back to my windows desktop

View 8 Replies View Related

Programming :: Detect Current OS In Compile Time?

Dec 8, 2010

Code:

#if defined(WIN32) || defined(WIN64)
#define WINDOWS
#endif

[code]....

what is the directive thats required to detect a linux system? i want to to be able to detect which platform im compiling on automatically.

View 5 Replies View Related

Programming :: Getting Current Time Zone Offset?

Jun 18, 2010

I'm looking for a function (prefer POSIX, but Linux specific would do if it has to) to get the current timezone offset. For my location, eastern USA, that should be -14400 when daylight time is in effect, and -18000 otherwise.

View 1 Replies View Related

Debian :: Batch Print From CLI?

Feb 25, 2011

I've search the web, but didn't find anything specific to what I'm trying to do. Is it possible to batch print all files in a directory from the CLI? I'm sure it is, I just haven't found the right package. It can be done with OpenOffice, but the files are all PDFs.

View 3 Replies View Related

General :: Current Time - File Path No Longer Valid

Aug 21, 2011

I am reading about jiffies in linux kernel. In one of the related example in the book Linux Device Driver, the author use
head -8 /proc/currentime
to print out some time information.

However this file is not present in my linux installation (kernel: 2.6.32-131.6.1.el6.x86_64). Why is it the case? Is it because the file path is no longer valid, or it is a distribution feature thing? It is not present in OSX too. What would be an equivalent in OSX?

View 1 Replies View Related

Programming :: Write A Batch File For Windows That Starts Cygwin Tool And Runs Unix Scripts?

Nov 17, 2008

I need to write a batch file for windows that automatically starts the cygwin tool in windows and executes the unix scripts.Previously we had these scripts in unix server.Now we need to migrate them to Windows server.For this reason we are using cygwin tool that allows the scripts to be executed on Windows server.We had written a batch file that starts the cygwin tool,but we were not able to execute the unix scripts.How can we write a batch file such that it executes all the unix scripts in cygwin.

View 5 Replies View Related

Debian Installation :: Set A Home File And Print Server While Learning At The Same Time?

Apr 5, 2010

I am trying to set a home file and print serverwhile learning about Linux at the same time. How ever I have hit a wall...I am trying to install samba but I have the following messages...

Urbie:~# apt-get install samba
Reading package lists... Done
Building dependency tree

[code]....

View 2 Replies View Related

Programming :: Get System Current Status To C Program From 'htop'

Jan 17, 2010

Actually I suppose to use this "htop" command to get the system utilities like current processor speed ,running programs ,memory usage(ram and swap) to my program. I planned to get it using popen(). I was success popen("top | grep Mem", "r") with top command. But are there a way to take such information using "htop". Or are there any idea of taking current CPU,MEM,Swp usage as well as Tasks and running tasks using htop or other way to C program...

View 1 Replies View Related

Programming :: Print A Value To A File ?

Apr 12, 2010

I have this code:

How can I print &FARAchieved to a file? Or, printing the whole bioReturn would be fine too.

View 8 Replies View Related

Programming :: Print File Name In BASH

Feb 26, 2009

I want to write a script that returns me name of the files that begin with the specified characters. like

Script out should be

View 3 Replies View Related

General :: Change The Creation Time Of All A Folder's Files To The Current Time?

Jun 19, 2011

Under a Linux shell, how can I change the creation time of all a folder's files to the current time?

View 2 Replies View Related

Programming :: C - Can't Print In Screen The Content Of File

Mar 20, 2010

why this code can't print in the while loop the content of the file ?

Code:

#include <stdio.h>
int main()
{
FILE *fp;

[code]...

View 7 Replies View Related

Programming :: Using An Awk Command To Print A Line From A Cvs File?

Mar 4, 2011

I am using an awk command to print a line from a cvs file.the awk command includes an if statement that filter the output-lets say i want to print all the lines that the price field is greater than 30.i have it working when i put the parameters myself.. but when i try to send them with vars it wont work..i am sending the sign of the if statement - can only be: == , < , >it looks like this:

cat file.csv | awk -v sign=">" -v field="2000" '{if($3 sign field) printf "%-12s%-12s%-12s%-12s
",$1,$2,$3,$4}' FS=,

the bold part is the problem , because when i put the sign parameter myself t works great.. i guess its a chars issue but i cant spot it

View 3 Replies View Related

Programming :: Awk+print, Create File If Not Exixt?

May 15, 2011

I having the following awk line in a script, is it possible to modify the script so that it create a the directory if it dosnt exist (similar to mkdir -p) awk -v datum="$DATUM" -v workingdir="$workingdir" '{ sub("\[.*","",$5); print > workingdir"/"datum "/" $5;}' $1

View 1 Replies View Related

Programming :: Cannot Capture - No At End Of File Store It And Print It Using Sed And Awk

Nov 25, 2008

How to write a shell script the would search for a phone no using at the end text file using sed or awk and store it in a varaible or print it.

The text file is in this form

The first line may take any form but the last line will always be Firstname Lastname:KEN:+254456789

I would like to seach for the Phone and store it in a variable and print it.

The phone no will alway be preceeded by ":+"

View 10 Replies View Related

Ubuntu :: Set Up An Print-to-file-printer With An Alternative System To CUPS?

Oct 4, 2010

Does anyone know how to set up an print-to-file-printer with an alternative system to CUPS? The quality suck on CUPS and there's NO solution, at least i didn't found anyone

View 3 Replies View Related

Programming :: HUGE Files - Compare A List Of Patterns From One File And Grep Them Against Another File And Print Out Only The Unique Patterns?

Aug 13, 2010

I am trying to compare a list of patterns from one file and grep them against another file and print out only the unique patterns. Unfortunately these files are so large that they have yet to run to completion. Here's the command that I used:

Code: grep -L -f file_one.txt file_two.txt > output.output Here's some example data:

Code:
>FQ4HLCS01BMR4N
>FQ4HLCS01BZNV6
>FQ4HLCS01B40PB
>FQ4HLCS01BT43K
>FQ4HLCS01CB736
>FQ4HLCS01BU3UM
>FQ4HLCS01BBIFQ

how to increase efficiency or use another command?

View 14 Replies View Related

Programming :: Awk: Print Out A Message To The Screen When Redirecting The Output To File?

Mar 15, 2010

I have a problem when using awk:

e.g: awk '{processing text}' File1 > File2

But when I'm processing the File1, I want to print out some messages to the screen (not the File2). How can I do that?

View 5 Replies View Related

Programming :: Arrays In Awk - Take Some Data From A File - Ssh Log - And Print It To A Html Table

Feb 7, 2011

I have a problem with arrays in awk. What i want is to take some data from a file (ssh log) and print it to a html table. I have managed to print some stuff (user logged in and how many times they have logged in) What i want more is to take all the ip that each user logged in from and print it in a row next to the username and times (in the code i typed blabbla where i want the ip to be shown. How do you think i should approch that, multidimensional arrys maybe?

Code:

View 14 Replies View Related

Programming :: Get System Info Like Up Time - No Of Process ?

May 26, 2010

I want to get system info like up time, no of process etc. for up time i got the got from net but it is giving me error. i.e.

error:

Following is the code i m using

Code:

Whats wrong with the code?

View 2 Replies View Related

Slackware :: Can't Print From Any Non KDE Application On Current

Aug 2, 2010

Using current 32 bit I'm unable to print anything outside of KDE. If I print something from Konqueror or Koffice for instance, my printer shows up in the dialog and everything prints fine. However if I use openoffice or abiword, etc then my only option is to "print to file" It is a samba shared printer that is attached to a 13.1 server, but I don't know that that makes a difference.

View 2 Replies View Related

Programming :: Calling System Calls In C Runtime (in The Run-time)?

Sep 23, 2010

I know there is a way to call winapi in runtime in windows. I want to ask how can I call a system call in gcc in runtime (when I don't know what it can be)? I don't mean syscall that I think is for calling only system calls and not library functions.

View 4 Replies View Related

Programming :: Use Regex In Perl Script To Detect Allowed Words From The File And Then Print Output To The Screen?

Oct 4, 2010

Its my first post in here so please be patient I am trying to use regex in perl script to detect allowed words from the file and then print output to the screen.

As an example : I have text file with orders and returns :

Item2-SKU-2-11.08.2010-online
Item3-SKU-3-11.09.2010-return
Item4-SKU-4-11.09.2010-store

My question: is it possible to make sure that i am ony outputing to the screen orders based on few conditions like Item,order form e.g. online.And is it possible to have multiple matches (Item2 only diplay if ordered online etc)

View 1 Replies View Related

Networking :: Terminal Command To Print Current Network?

Jan 24, 2011

I'm hoping this is the right category. Is there a terminal command to display what network you're currently connected to?
Example:
My home network's name is (in this example) "home".When connected to it, I want a command that, when run, would give me the output 'home'. Does such a command exist?

View 1 Replies View Related

General :: Convert Batch File Into A .sh File Will Not Work

Sep 16, 2010

I am trying to convert my batch file into a .sh file and i think i have it perfect but it just will not work, so obviously not perfect. This is the code for my batch file.

[Code]....

This works perfectly on my own computer without any problems. I want to host this on my Linux VPS (CentOS 5) and need it to be converted into run.sh. This is the code for my run.sh.

[Code]....

View 9 Replies View Related

Ubuntu Networking :: Connected Via Usb File Goes To Print Que But Will Not Print ?

Aug 14, 2010

Just installed drivers for Lexmark pro200 - S500 series. However although it is recognised by the system and has a tick by its name, And tells me it is connected via usb file goes to print que but will not print. Also tells me it is Printing - localhost! is this correct?.

View 1 Replies View Related

Ubuntu :: Print Current Working Directory In Title Of Xterm?

Jan 29, 2011

In any case what I'm asking it how can I set PWD into my xTerm title bar. I do NOT want pwd at my command prompt because it would make it too long.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved