Sponsored Content
Top Forums Programming Need help in storing command line argument argv[2] to a variable of int type Post 302267273 by jim mcnamara on Friday 12th of December 2008 04:16:26 AM
Old 12-12-2008
Code:
int iFilecount=0;
// later on in the code...
iFilecount=atoi(argv[2]);

P
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing the command line argument in a variable

Hi, I am new to unix. Is their a way to pass the output of the line below to a variable var1. ls -1t | head -1. I am trying something like var1=ls -1t | head -1, but I get error. Situation is: I get file everyday through FTP in my unix box. I have to write a script that picks up first... (1 Reply)
Discussion started by: rkumar28
1 Replies

2. Programming

Help - Cast converts default int return type

What does the warning message 724 "Cast converts default int return type to." tell me. I am new to C. (used it some in college). We are migrating our c-code to 10.2.0.3.0. The programs compiled clean. However there were several warning messages that kick out. The most prominent warning is: ... (5 Replies)
Discussion started by: rtgreen
5 Replies

3. Shell Programming and Scripting

storing result of a command in variable

For whatever reason I cant seem to fix my syntax to do the following. I want to run a grep and count how many instances come up and store that number in a variable but I keep erroring out. Here's my code in bash: number=grep blah file.txt | wc -l (1 Reply)
Discussion started by: eltinator
1 Replies

4. Shell Programming and Scripting

storing a command in a variable

how would i go about storing this command in a variable echo "$LINE" | awk -F"|" '{print $1"|"$2"|"$3"}' i have tried FOO = ${command up there} but receive the error FOO: not found aswell as a couple of other attempt but no luck (2 Replies)
Discussion started by: nookie
2 Replies

5. Shell Programming and Scripting

Using ARGV, acepting text from command line

I want to be able to call in my file and make it do it's magic by basically giving it: FileNAME.pl searchTerm fileToSearch It runs, and gives me the answers I want, however, it gives me an error: Can't open GAATTC: No such file or directory at .//restriction_map_better.pl line 15... (2 Replies)
Discussion started by: silkiechicken
2 Replies

6. Shell Programming and Scripting

Storing o/p of a command to a variable

Hi, I have a ftp script there I want to store the o/p of the below command: sftp -b <batch file> user@password cat <batch file> get /remote/file/path/remote_file_name.csv*.gz /local/path Now the problem is that when I fire this command. Then it gives o/p as: File... (7 Replies)
Discussion started by: dips_ag
7 Replies

7. Shell Programming and Scripting

Pass command line argument to variable

Hi, I had written a shell script to pass command line argument to variable in a function. Here is my code: main if ; then .$1 echo $1 get_input_file else echo "input file $1 is not available" fi get_input_file() { FILE = "$1" echo $FILE } (10 Replies)
Discussion started by: Poonamol
10 Replies

8. Programming

Splitting string and storing in int

I have a string containing 2 integers separated by /, for example 12/8 or 8/6 am want to store the numbers in two integers. (3 Replies)
Discussion started by: kristinu
3 Replies

9. Shell Programming and Scripting

Storing command output in a variable and using cut/awk

Hi, My aim is to get the md5 hash of a file and store it in a variable. var1="md5sum file1" $var1 The above outputs fine but also contains the filename, so somthing like this 243ASsf25 file1 i just need to get the first part and put it into a variable. var1="md5sum file1"... (5 Replies)
Discussion started by: JustALol
5 Replies

10. Shell Programming and Scripting

Storing awk command in a variable

I'm working on a script in which gives certain details in its output depending on user-specified options. So, what I'd like to do is something like: if then awkcmd='some_awk_command' else awkcmd='some_other_awk_command' fi Then, later in the script, we'd do something like: ... (5 Replies)
Discussion started by: treesloth
5 Replies
VEUSZ_LISTEN(1) 						       Veusz							   VEUSZ_LISTEN(1)

NAME
veusz_listen - command-line interface to the Veusz plotting application. SYNOPSIS
veusz_listen [WindowTitle]... DESCRIPTION
Veusz is a scientific plotting and graphing package. veusz_listen provides a command line interface to its scripting interface. veusz_listen opens a new window (with an optional window title) and listens to stdin. It executes Veusz scripting commands, writing any output to stdout. veusz_listen is now deprecated. Please use veusz --listen instead. SEE ALSO
veusz(1) BUGS
Please report bugs at https://gna.org/bugs/?group=veusz AUTHORS
Veusz was written by Jeremy Sanders <jeremy@jeremysanders.net>. This manual page was written by Jeremy Sanders <jeremy@jeremysanders.net>. COPYRIGHT
Copyright (C) 2003-2012 Jeremy Sanders <jeremy@jeremysanders.net>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. 1.15 2012-03-28 VEUSZ_LISTEN(1)
All times are GMT -4. The time now is 12:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy