#!/bin/bash
array=()
while IFS= read -r -p "Enter next item (blank to end input): " element
do
[[ $element ]] || break
array+=("$element")
done
printf "%s " "${array[@]}"
printf "\n"
Dear Friends,
I am doing a sh shell script , But I dont have any idea how to read value from user Keyboard and store them to an array .. Is it possible or not I am not also sure in sh shell script ?
EX:-
#! /bin/sh
read DATA
echo "DATA -" $DATA
echo "DATA -" $DATA
echo "DATA... (7 Replies)
Hi all
I have a little brainscratcher here.
I want to draw a pie chart from data in a text file.
The drawing of the graph works fine, if I insert the data manually into a 2d array.
Now I want to pull the data from a text file (which was created using a uniq -c command) see sample below.... (2 Replies)
Hi all,
I wrote a script that reads inputs from user and store in array named "input". The number of elements in the array is not fixed - determined only after user exit the while loop that reads the array values :
x=1
echo "Enter first value"
read input
while } != "exit" ]
do
... (1 Reply)
Hi,
In the below C code , i want to pass the array to a unix shel script.
my script should called as ex myscript 1,2,3
#include <stdio.h>
int main()
{
int a={1,2,3};
}
Thanks,
Arun (1 Reply)
Hello,
Can somebody please give me a snippet for the below requirement.
I want to assign the values separeted by a comma to be assigned to a dynamic array.
If I give an input (read statement) like abc1,abc2,abc3,abc4,abc5, all these strings abc* should be assigned to an array like below... (2 Replies)
What I am doing is creating a top menu, which a user will select a choice with a number entry. That number corresponds to a string in an array. I then want to assign that response to another array I've already declared.
For example:
#!/bin/bash
colors=(red blue yellow)
red=(cherry fire)... (2 Replies)
I've always written scripts where the user executes the script and I prompt them for what they want to do.
But I'm trying to write a script where root executes the script 'lock' or its hard-link 'unlock' and the script will passwd -l or passwd -u an account depending on the choice.
What would... (3 Replies)
I need help parsing the output of find into an array. I need to search 3 directories and find all files older than 31 days old. This is what I have so far.
TIME=" -maxdepth 1 -mtime +31"
DIR1="/dir1/"
DIR2="/dir2/"
DIR3="/dir3/"
FIND_DIR1=$(find ${DIR1}${TIME})
FIND_DIR3=$(find... (8 Replies)
Hi folks..
i got a requirement to red multiple directories from STDIN and store them to a variable.
ex:-
echo "Enter directory to add:"
echo " Enter directory to add:"
read value till there is input and when there is no input close the read loop and store variable into an array
... (1 Reply)
Hello,
I am running under ubuntu1 14.04 and I have a script which is sending given process names to vanish so that I'd see less output when I run most popular tools like top etc in terminal window. In usual method it works.
Whenever I restart the system, I have to enter the same data from... (2 Replies)
Discussion started by: baris35
2 Replies
LEARN ABOUT DEBIAN
transmission-remote-cli
transmission-remote-cli(1) transmission-remote-cli transmission-remote-cli(1)NAME
transmission-remote-cli - a console client for the Transmission BitTorrent client
SYNOPSIS
transmission-remote-cli [options] [filename-or-URL]
DESCRIPTION
transmission-remote-cli is a curses interface for the daemon of the BitTorrent client Transmission.
OPTIONS --version
Show version number and exit
-h --help
Show usage information and a list of options
-c CONNECTION --connect=CONNECTION
Point to the server. CONNECTION must match the following pattern:
[username:password@]host[:port][path]
Default: localhost:9091
-s --ssl
Use SSL to connect to the server.
Default: don't use SSL
--create-config
Create configuration file with default values.
NOTE: A config file won't be created unless you provide this option at least once. After that, it is rewritten whenever transmis-
sion-remote-cli exits.
-f CONFIGFILE --config=CONFIGFILE
Set path to configuration file.
Default: ~/.config/transmission-remote-cli/settings.cfg
-n --netrc
Get authentication info from ~/.netrc.
-- OPTIONS
Use the known server connection to pass OPTIONS on to transmission-remote.
FILES
transmission-remote-cli overwrites the configuration file on exit. Keep that in mind if you edit it manually.
SEE ALSO transmission-create(1), transmission-daemon(1), transmission-edit(1), transmission-gtk(1), transmission-qt(1), transmission-remote(1),
transmission-show(1).
April 22, 2012 transmission-remote-cli(1)