10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file service.xml which has following content:
<?xml version="1.0" encoding="UTF-8"?>
<Service Ver="2.31.13"/>
I want to read the value of Ver (that is 2.31.13) and assign to a variable which i further use.
Please help me in that. (3 Replies)
Discussion started by: laxmikant15
3 Replies
2. Shell Programming and Scripting
I have a input file like this.
Sample.txt
30 | TXDatacenter | TXBackupDC
10 | UKDatacenter | UKBackupDC
0 | NLDatacenter | NLBackupDC
......
......
......
I need to get these values in different variables like this.
Load1=30
PriCenter1=TXDatacenter... (5 Replies)
Discussion started by: Visha
5 Replies
3. Shell Programming and Scripting
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Discussion started by: shadok
2 Replies
4. Shell Programming and Scripting
hello
i have two files
temp.txt
and temp_unique.text
the second file consists the unique fields from the temp.txt file
the strings stored are in the following form
4,4
17,12
15,65
4,4
14,41
15,65
65,89
1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Discussion started by: vaibhavkorde
3 Replies
5. Shell Programming and Scripting
Hi Gurus,
I am trying for a scenario where in I want to read the contents of a file line by line and then store them in variables. Below is the script:
#!/bin/ksh
while read line
do
id=`echo $line | cut -f1 -d |`
name=`echo $line | cut -f2 -d |`
echo $id
... (11 Replies)
Discussion started by: svajhala
11 Replies
6. Shell Programming and Scripting
Hi,
How to read xml tag attributes and store into variable in shell script?
Thanks,
Swetha (5 Replies)
Discussion started by: swetha123
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
How to read a file and put the values in a script. E.g.
file1.txt
02/12/2009;t1;t2
The script should read this file and put these values in 3 different variables x1,x2,x3 which can be used further.
Thanks
Ashu (3 Replies)
Discussion started by: er_ashu
3 Replies
8. Shell Programming and Scripting
hi,
I am a begginer in unix and i want to know how to open a file and read it and separate the numbers & words and storing it in separate files, Using shell scripting.
Please help me out for this.
Regards
S.Kamakshi (2 Replies)
Discussion started by: kamakshi s
2 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I'm quite new to unix and hope that someone can help me on this.
I'm using csh.
Below is what i intend to do.
1. I stored some data in a file.
2. I intend to read the file line by line and store each line of data into a variable, so that i can used it later.
Anyone have any... (4 Replies)
Discussion started by: seijihiko
4 Replies
10. Shell Programming and Scripting
Hello all,
I need to run snoop command for a period of time (a day) and extract remote host column from it to find out who is accessing my server. When I run the following on the command line it works
snoop -port 22 | awk '{print $3}'
but when I do
snoop -port 22 | awk '{print $3}' | while... (2 Replies)
Discussion started by: afadaghi
2 Replies
ALSACTL(1) General Commands Manual ALSACTL(1)
NAME
alsactl - advanced controls for ALSA soundcard driver
SYNOPSIS
alsactl [options] [store|restore|init] <card # or id or device>
DESCRIPTION
alsactl is used to control advanced settings for the ALSA soundcard drivers. It supports multiple soundcards. If your card has features
that you can't seem to control from a mixer application, you have come to the right place.
COMMANDS
store saves the current driver state for the selected soundcard to the configuration file.
restore loads driver state for the selected soundcard from the configuration file. If restoring fails (eventually partly), the init action
is called.
init tries to initialize all devices to a default state. If device is not known, error code 99 is returned.
If no soundcards are specified, setup for all cards will be saved or loaded.
OPTIONS
-h, --help
Help: show available flags and commands.
-d, --debug
Use debug mode: a bit more verbose.
-v, --version
Print alsactl version number.
-f, --file
Select the configuration file to use. The default is /etc/asound.state.
-F, --force
Used with restore command. Try to restore the matching control elements as much as possible. This option is set as default now.
-g, --ignore
Used with store and restore commands. Do not show 'No soundcards found' and do not set an error exit code when soundcards are not
installed.
-P, --pedantic
Used with restore command. Don't restore mismatching control elements. This option was the old default behavior.
-I, --no-init-fallback
Don't initialize cards if restore fails. Since version 1.0.18, alsactl tries to initialize the card with the restore operation as
default. But this can cause incompatibility with the older version. The caller may expect that the state won't be touched if no
state file exists. This option takes the restore behavior back to the older version by suppressing the initialization.
-r, --runstate
Save restore and init state to this file. The file will contain only errors. Errors are appended with the soundcard id to the end
of file.
-R, --remove
Remove runstate file at first.
-E, --env #=#
Set environment variable (useful for init action or you may override ALSA_CONFIG_PATH to read different or optimized configuration -
may be useful for "boot" scripts).
-i, --initfile #=#
The configuration file for init. By default, PREFIX/share/alsa/init/00main is used.
FILES
/etc/asound.state (or whatever file you specify with the -f flag) is used to store current settings for your soundcards. The settings
include all the usual soundcard mixer settings. More importantly, alsactl is capable of controlling other card-specific features that
mixer apps usually don't know about.
The configuration file is generated automatically by running alsactl store. Editing the configuration file by hand may be necessary for
some soundcard features (e.g. enabling/disabling automatic mic gain, digital output, joystick/game ports, some future MIDI routing options,
etc).
SEE ALSO
amixer(1), alsamixer(1), aplay(1)
BUGS
None known.
AUTHOR
alsactl is by Jaroslav Kysela <perex@perex.cz> and Abramo Bagnara <abramo@alsa-project.org>. This document is by Paul Winkler
<zarmzarm@erols.com>.
15 May 2001 ALSACTL(1)