Sponsored Content
Full Discussion: C terminal commands
Top Forums Programming C terminal commands Post 302760331 by milestails on Thursday 24th of January 2013 12:42:48 AM
Old 01-24-2013
I really appreciate you help me!

I don’t have much real knowledge of this kind of stuff, nor know the technical terms. Most of what I know is just from messing around, one of these days I should actually read a book.

By “call” I mean be able to input a function? into another line. So if these are the right terms.
variable=function
math= (2+1)/2
answer=math
but be able to do that with the command I have, with the output being assigned a variable

Yeah I realized that the command was pretty messy but it was the only way I could figure it out. The original output is
Code:
eth0:UP (in=0.0Mbps/out=0.0Mbps):1 UP: OK

the issue I had was that the numbers scale? Up . for example in=5.0, in=10.4, in=28.3. This was the only way I could figure out how to get the numbers regardless if it was three or two digits.

The main purpose of the program is to write the percentage to an usb device. I figure if I could get as far as printf the percentage, the next step would be easy. Anyways the writing to usb command is just
Code:
writeUSB(perf_fs_usb,downspeed,upspeed)

This User Gave Thanks to milestails For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Terminal Commands

Hi there. Linux newbie and I'm trying to find commands to: Display number of executable files in a directory that i supply and list them in alphabetical order Back up all the files in the current irectory to a directory i supply, creating that directory if it's not allready there Cound... (5 Replies)
Discussion started by: indigoecho
5 Replies

2. Shell Programming and Scripting

Displaying a dialog box using terminal commands

Hello, I used the command osascript -e 'tell app "Finder" to display dialog "Hey!"' to display a dialog box..it works fine, it displays a dialog box with 'OK' and 'CANCEL' buttons..i want to get the button returned value how can i do that using terminal command? is there any command to get... (1 Reply)
Discussion started by: keshav.murthy@r
1 Replies

3. Cybersecurity

How do i find all the commands entered by root on any terminal

Can any one help me with a script, which runs in background and mails me all the commands entered by root on any terminal for every hour. We have multiple people having root access on the server and creating a mess,i just wanted to monitor all the activity of the root. (13 Replies)
Discussion started by: vishnu787
13 Replies

4. Shell Programming and Scripting

commands in the terminal

hi.. I have a small question...if I have a textfile..let say apple.txt and I want to 1. search for all strings that's 6 characters long, and contains the letters a,b,c,d. 2. search for all words that that begins with "sUn" and ends with "flower" 3. search for all the words beginning with the... (3 Replies)
Discussion started by: Oregano
3 Replies

5. UNIX for Dummies Questions & Answers

help with simple terminal commands

i am at home with a windows xp home, and i am using putty terminal to access my linux mathlab account, my task is to compile and run a C program, called a.c, i used gcc -Wall -g -o mycode a.c to compile it into a mycode file now when i want to run it, i was told i had to use $... (2 Replies)
Discussion started by: omega666
2 Replies

6. UNIX Desktop Questions & Answers

help with some basic osx terminal commands. fixing permissions on NAS share

I'm hoping someone here can help me. I'm computer literate but by no means an expert! I'm simply trying to recover data from my DLink DNS343 NAS mounted on my X86 iMac using SMB. Somehow, in moving to a new computer, I have lost access to some files on the NAS. Just some files are access denied. ... (0 Replies)
Discussion started by: Quantaa
0 Replies

7. Shell Programming and Scripting

Replicate history commands in multiple terminal

Hi, I am using putty client to connect to my remote Linux server box, and I am connecting through ssh. That system runs bash shell. So, if I use multiple putty terminal, how can I replicate those commands that I ran in other terminals to be available/shared in the current terminal window (i.e)... (1 Reply)
Discussion started by: royalibrahim
1 Replies

8. OS X (Apple)

Terminal autorunning commands at start

How do I make terminal autorun commands at start up? For example, I have several windows of terminal, I want one to automatically run 'top' and a couple others autorun 'man' pages. Is there any way I can do this? (1 Reply)
Discussion started by: randomtypos
1 Replies

9. Shell Programming and Scripting

How to save and execute terminal commands in shell?

I frequently use some commands, which I want to save in some file say myregularshell.shthese are the commands I use, I tried saving and executing, but couldn't get the preview of execution, and result is also not coming if I copy same commands and paste it on terminal result is coming cd go... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies

10. Ubuntu

Creating terminal commands

I've written a program in C, called count_0.1 which is essentially a word count program. I want to be able to use it as a command in the terminal (by typing in count), like when you type in ls, you don't have to go to a directory, find an executable and type in: ./ls I've tried: Adding... (1 Reply)
Discussion started by: usernamer
1 Replies
VCONSOLE.CONF(5)						   vconsole.conf						  VCONSOLE.CONF(5)

NAME
vconsole.conf - configuration file for the virtual console SYNOPSIS
/etc/vconsole.conf DESCRIPTION
The /etc/vconsole.conf file configures the virtual console, i.e. keyboard mapping and console font. The basic file format of the vconsole.conf is a newline-separated list environment-like shell-compatible variable assignments. It is possible to source the configuration from shell scripts, however, beyond mere variable assignments no shell features are supported, allowing applications to read the file without implementing a shell compatible execution engine. Note that the kernel command line options vconsole.keymap=, vconsole.keymap.toggle=, vconsole.font=, vconsole.font.map=, vconsole.font.unimap= may be used to override the console settings at boot. Depending on the operating system other configuration files might be checked for configuration of the virtual console as well, however only as fallback. OPTIONS
The following options are understood: KEYMAP=, KEYMAP_TOGGLE= Configures the key mapping table of for they keyboard. KEYMAP= defaults to us if not set. The KEYMAP_TOGGLE= can be used to configured a second toggle keymap and is by default unset. FONT=, FONT_MAP=, FONT_UNIMAP= Configures the console font, the console map and the unicode font map. FONT= defaults to latarcyrheb-sun16. EXAMPLE
Example 1. German keyboard and console /etc/vconsole.conf: KEYMAP=de-latin1 FONT=latarcyrheb-sun16 SEE ALSO
systemd(1), loadkeys(1), setfont(8), locale.conf(5) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 VCONSOLE.CONF(5)
All times are GMT -4. The time now is 04:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy