I am working on a Raspberry Pi and using sed to update the SSID and password but the config file requires the SSID and PSK to both be in double quotes. Below is the code I am using but I cannot figure out how to include the double quotes.
script:
Code:
#!/bin/bash
read -p "Please specify the Wireless Network SSID: " SSID
echo "$SSID"
sudo sed -i -e"s/^ssid=.*/ssid="$SSID"/" /etc/wpa_supplicant/wpa_supplicant.conf
read -p "Please specify the Wireless Network Password: " WIFIPASS
echo "$WIFIPASS"
sudo sed -i -e"s/^psk=.*/psk="$WIFIPASS"/" /etc/wpa_supplicant/wpa_supplicant.conf
echo "You need to reboot to connect to the internet"
echo "1. Reboot Now?"
echo "2. Exit without Rebooting"
echo -n "Enter your choice: "
read REBOOT
echo
case $REBOOT in
1)
sudo reboot
;;
2)
echo "You will not have internet access until after you reboot!"
;;
0)
echo "Thank You"
;;
esac
I'm using sed for Windows at a WinNT command prompt. Wrapping the expressions with single quotes doesn't work. I have to use double quotes. Is this the norm for the Windows implementation? (2 Replies)
I have a csv file with lines like the followings
123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"
before I bcp this file to database, the comma in "CO.," need to be removed first.
My script is cat <filename> | sed 's/"CO.,"/"CO."/g'
but it doesn't work. Can anyone here able to... (2 Replies)
I have the following line of code:
sed -i "/MatchText/ s/${tgrepLine}/${tNewLine}/" filename.outputfilename.output contains this:
blablabla
PATH=".:/home/root/bin/:/usr/local/bin/"
blablablaVariable ${tgrepLine} contains:
PATH=".:/home/root/bin/:/usr/local/bin/"
Variable ${tNewLine}... (3 Replies)
I have not seen anything yet in your forum to answer this problem.
Here is my sed command.
I want to change
Build Apache module" off
to
Build Apache module" on
This is what I am trying.
sed "s_Build Apache module\" off_Build Apache module\" on_" /usr/ports/lang/php5/Makefile... (9 Replies)
Hi,
I have data as
"01/22/97-"aaaaaaaaaaaaaaaaa""aaa""aabbbbbbbbcccccc""zbcd""dddddddddeeeeeeeeefffffff"
I want to remove only the Consequitive double quotes and not the one which occurs single.
My O/P must be ... (2 Replies)
Hello experts,
I need to validate a csv file which contains data like this:
Sample.csv
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
I just need to check if all the records contain exactly the number of... (5 Replies)
Hi All,
I have been trying to replace a string using the sed command
string value contain blackslash and double quotes. I am not a expert writer of unix script but do try not to ask question. I have almost given up. Hope you all can give me some suggestion
I want to replace a place string... (6 Replies)
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
I need to replace consecutive double quotes in a csv file, the data in the file is enclosed in double quotes but there are some places where the quotes are repeating
Example is below
Incoming data is :
"Pacific Region"|"PNG"|"Jimmy""|""|
Need output as:
"Pacific... (10 Replies)
Discussion started by: abhilashnair
10 Replies
LEARN ABOUT DEBIAN
axspawn.conf
AXSPAWN.CONF(5) Linux Programmer's Manual AXSPAWN.CONF(5)NAME
axspawn.conf - Control the operation of axspawn.
DESCRIPTION
The axspawn.conf file controls the operation of the axspawn(8) program. The operation of the config file can best be seen in an example:
# this is /etc/ax25/axspawn.conf
#
# allow automatic creation of user accounts
create yes
# allow empty password field (so user may login via telnet, too) [default no]
create_empty_password no
#create_empty_password yes
# create with system utility useradd(8)? [default no]
#create_with_useradd no
create_with_useradd yes
#
# pwcheck method: password or call or group. [default: password]
#pwcheck call
#pwcheck group
pwcheck password
#
# guest user if above is 'no' or everything else
# fails. Disable with "no"
guest guest
#
# group id or name for autoaccount
group hams
#
# first user id to use
first_uid 400
#
# maximum user id
max_uid 2000
#
# where to add the home directory for the new user
home /home/hams
#
# secure homedirectories (g-rwx)
#secure_home yes
#
# user's shell
shell /bin/bash
#
# bind user id to callsign for outgoing connects.
associate yes
The "associate" option has to be used with great care. If a user logs on it removes any existing callsign from the translation table for
this userid and replaces it with the callsign and SSID of the user. This will happen with multiple connects (same callsign, different
SSIDs), too. Unless you want your users to be able to call out from your machine disable "associate".
FILES
/etc/ax25/axspawn.conf
SEE ALSO axspawn(8).
Linux 2 August 1996 AXSPAWN.CONF(5)