Sponsored Content
Top Forums Shell Programming and Scripting Input Validation of comma separated values Post 302525065 by LinuxRacr on Wednesday 25th of May 2011 03:26:31 PM
Old 05-25-2011
Thanks for your reply. I guess one thing I forgot to mention above is that I only want the input line, because it will be passed off to another script to decide what to do with the input. For example, I want it to echo "GOOD JOB!!!' only when the criteria are met, and error out if any of the comma separated fields are not valid.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting comma separated values into an array

I'm attempting to create a KSH array out of a string like this: ",,,value1,value2,," I have created the array but I only get two elements, one for value1 and one for value2. I have ended up with something like this but I don't like it: set -A JUNK xx=0 for i in $(print ",,,value1,value2,,"... (3 Replies)
Discussion started by: tmarikle
3 Replies

2. Shell Programming and Scripting

Extracting the values separated by comma

Hi, I have a variable which has a list of string separated by comma. for ex , Variable=/usr/bin,/usr/smrshbin,/tmp How can i get the values between the commas separately using shell scripts.Please help me. Thanks, Padmini. (6 Replies)
Discussion started by: padmisri
6 Replies

3. Shell Programming and Scripting

script to store comma separated values in different variables

Hello friends, I need ur help.I want to write a script. The script should read contents from a file namely xyz. e.g xyz abcd,1234,efgh,7854378 dhnsa,dsakjkdl,43432,ZXDsa the script should store comma (,) seperated values in different variables. Once pointer will reach end of line (\n), it should... (1 Reply)
Discussion started by: akhtar.bhat
1 Replies

4. Shell Programming and Scripting

To agregate Comma separated values

Hi pls help me to get the code: i have a file in which content is : 2.01304E+11 2.01304E+11 ori 2 01:00 2.01304E+11 2.01304E+11 ori 2 01:02 2.01304E+11 2.01304E+11 ori 3 01:02 2.01304E+11 2.01304E+11 ori 3 ... (7 Replies)
Discussion started by: Aditya.Gurgaon
7 Replies

5. UNIX for Dummies Questions & Answers

[solved] Comma separated values to space separated

Hi, I have a large number of files which are written as csv (comma-separated values). Does anyone know of simple sed/awk command do achieve this? Thanks! ---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ---------- Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies

6. Shell Programming and Scripting

Needs help in parsing comma separated values

hello experts, i am retrieving values in variables jobKey and jobName within my shell script. these values are returned to me within braces and i am using following command to remove those braces: jobKeys=`echo $jobKeys | sed 's:^.\(.*\).$:\1:'` jobNames=`echo $jobNames | sed... (1 Reply)
Discussion started by: avikaljain
1 Replies

7. Shell Programming and Scripting

Comma separated values to individual lines

My OS : RHEL 6.7 I have a text file with comma separated values like below $ cat testString.txt 'JOHN' , 'KEITH' , 'NEWMAN' , 'URSULA' , 'ARIANNA' , 'CHENG', . . . . I want these values to appear like below 'JOHN' , 'KEITH' , 'NEWMAN' , 'URSULA' , 'ARIANNA' , 'CHENG', .... (4 Replies)
Discussion started by: kraljic
4 Replies

8. Shell Programming and Scripting

Assign comma separated values to a variable

Hi All, I wrote a database command that queries our application and outputs a whole bunch of values to a text file. I need to assign the output to two values. Here is a sample of the output: valueOne, checkOne valueTwo, checkTwo valueThree, checkThree I would like... (9 Replies)
Discussion started by: jeffs42885
9 Replies

9. Shell Programming and Scripting

Parsing Comma Separated values to UNIX variable from PLSQL

Hi All, I'm trying to pass the comma separated values (string) returned from Plsql Procedure to UNIX variable. getting the below log message cat: -: Bad file descriptor awk: cmd. line:1: fatal: error reading input file `-': Bad file descriptor The output coming from plsql procedure is... (3 Replies)
Discussion started by: Mahesh3089
3 Replies

10. Shell Programming and Scripting

Convert fixed value fields to comma separated values

Hi All, Hope you are doing Great!!!. Today i have came up with a problem to say exactly it was for performance improvement. I have written code in perl as a solution for this to cut in specific range, but it is taking time to run for files thousands of lines so i am expecting a sed... (9 Replies)
Discussion started by: mad man
9 Replies
pactl(1)						      General Commands Manual							  pactl(1)

NAME
pactl - Control a running PulseAudio sound server SYNOPSIS
pactl [options] COMMAND [ARGS ...] pactl --help pactl --version DESCRIPTION
pactl can be used to issue control commands to the PulseAudio sound server. pactl only exposes a subset of the available operations. For the full set use the pacmd(1). OPTIONS
-h | --help Show help. --version Show version information. -s | --server=SERVER Choose the server to connect to. -n | --client-name=NAME Specify the client name pactl shall pass to the server when connecting. COMMANDS
stat [short] Dump a few statistics about the memory usage of the PulseAudio daemon. (Note: for backwards compatibility, we also show the output of the info command. In order to only show statistics, use the optional short argument. In a future version of PA we will make this the default) info Dump some info about the PulseAudio daemon. list [short] [TYPE] Dump all currently loaded modules, available sinks, sources, streams, etc. TYPE must be one of: modules, sinks, sources, sink- inputs, source-outputs, clients, samples, cards. If not specified, all info is listed. If short is given, output is in a tabular format, for easy parsing by scripts. exit Asks the PulseAudio server to terminate. upload-sample FILENAME [NAME] Upload a sound from the specified audio file into the sample cache. The file types supported are those understood by libsndfile. The sample in the cache is named after the audio file, unless the name is explicitly specified. play-sample NAME [SINK] Play the specified sample from the sample cache. It is played on the default sink, unless the symbolic name or the numerical index of the sink to play it on is specified. remove-sample NAME Remove the specified sample from the sample cache. load-module NAME [ARGUMENTS ...] Load the specified module with the specified arguments into the running sound server. Prints the numeric index of the module just loaded to STDOUT. You can use it to unload the module later. unload-module ID|NAME Unload the module instance identified by the specified numeric index or unload all modules by the specified name. move-sink-input ID SINK Move the specified playback stream (identified by its numerical index) to the specified sink (identified by its symbolic name or numerical index). move-source-output ID SOURCE Move the specified recording stream (identified by its numerical index) to the specified source (identified by its symbolic name or numerical index). suspend-sink SINK 1|0 Suspend or resume the specified sink (which my be specified either by its symbolic name, or by its numeric index), depending whether 1 (suspend) or 0 (resume) is passed as last argument. Suspending a sink will pause all playback. Depending on the module implement- ing the sink this might have the effect that the underlying device is closed, making it available for other applications to use. The exact behaviour depends on the module. suspend-source SOURCE 1|0 Suspend or resume the specified source (which my be specified either by its symbolic name, or by its numeric index), depending whether 1 (suspend) or 0 (resume) is passed as last argument. Suspending a source will pause all capturing. Depending on the module implementing the source this might have the effect that the underlying device is closed, making it available for other applications to use. The exact behaviour depends on the module. set-card-profile CARD PROFILE Set the specified card (identified by its symbolic name or numerical index) to the specified profile (identified by its symbolic name). set-sink-port SINK PORT Set the specified sink (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name). set-source-port SOURCE PORT Set the specified source (identified by its symbolic name or numerical index) to the specified port (identified by its symbolic name). set-port-latency-offset CARD PORT OFFSET Set a latency offset to a specified port (identified by its symbolic name) that belongs to a card (identified by its symbolic name or numerical index). OFFSET is a number which represents the latency offset in microseconds set-sink-volume SINK VOLUME Set the volume of the specified sink (identified by its symbolic name or numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current sink volume. set-source-volume SOURCE VOLUME Set the volume of the specified source (identified by its symbolic name or numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current source volume. set-sink-input-volume INPUT VOLUME Set the volume of the specified sink input (identified by its numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specifi- cation start with a + or - the volume adjustment will be relative to the current sink input volume. set-source-output-volume OUTPUT VOLUME Set the volume of the specified source output (identified by its numerical index). VOLUME can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specifi- cation start with a + or - the volume adjustment will be relative to the current source output volume. set-sink-mute SINK 1|0 Set the mute status of the specified sink (identified by its symbolic name or numerical index). set-source-mute SOURCE 1|0 Set the mute status of the specified source (identified by its symbolic name or numerical index). set-sink-input-mute INPUT 1|0 Set the mute status of the specified sink input (identified by its numerical index). set-source-output-mute INPUT 1|0 Set the mute status of the specified source output (identified by its numerical index). set-sink-formats SINK FORMATS Set the supported formats of the specified sink (identified by its numerical index) if supported by the sink. FORMATS is specified as a semi-colon (;) separated list of formats in the form 'encoding[, key1=value1, key2=value2, ...]' (for example, AC3 at 32000, 44100 and 48000 Hz would be specified as 'ac3-iec61937, format.rate = "[ 32000, 44100, 48000 ]"'). subscribe Subscribe to events, pactl does not exit by itself, but keeps waiting for new events. AUTHORS
The PulseAudio Developers <pulseaudio-discuss (at) lists (dot) freedesktop (dot) org>; PulseAudio is available from http://pulseaudio.org/ SEE ALSO
pulseaudio(1), pacmd(1) Manuals User pactl(1)
All times are GMT -4. The time now is 09:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy