10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
2. Shell Programming and Scripting
I'm trying to convert this line:
to
\ with sed.
This is what I have so far:
sed -e 's/\]*\)\]/\\\\\/'
but this still gives me .
Any suggestions? (15 Replies)
Discussion started by: lehaste
15 Replies
3. UNIX for Dummies Questions & Answers
I have text file which is a tab delimited one. Sample data from the file is shown below:
unix is\ great\ os
linux\ is superb
I want to replace that backslash with empty string preserving the tab delimiter. Output should be
unix is great os
linux is ... (3 Replies)
Discussion started by: p.akhilreddy4u
3 Replies
4. Shell Programming and Scripting
Both of these fail. One has two form feeds, the second form leaves all the backslashes.
bold='\(code\|command\|var\|samp\|option\|strong\)'
sed -e "s;@${bold}{"'\(*\)};\fB\2\fP;g'
sed -e "s;@${bold}{"'\(*\)};\\fB\2\\fP;g'
Obviously, I'm trying to change texi markup into man page markup, but it... (3 Replies)
Discussion started by: bkorb
3 Replies
5. Shell Programming and Scripting
hyper link- abc:8081/xyz/2.5.6/rtyp-2.5.6.jar
Needs to get "rtyp-2.5.6.jar" i.e character after last backslash "/"
how to do this using sed/awk??
help is highly appreciated. (7 Replies)
Discussion started by: kkscm
7 Replies
6. Shell Programming and Scripting
I have a shell script that I have written to be a kind of to-do/notepad that's quickly executable from the command line. However, special characters tend to break it pretty well.
Ie: "notes -a This is an entry." works fine.
"notes -a This is (my) entry." will toss back a bash syntax error on... (5 Replies)
Discussion started by: skylersee
5 Replies
7. Shell Programming and Scripting
I am trying to write a bash shell script, which extracts a sentence from a dynamically created dynamic file and passes it as a variable to sed and uses that sentence as a starting point to pull the content from a log file.
the key part of the script is this
key=`cat /tmp/dynamic`
sed -n... (3 Replies)
Discussion started by: fedora
3 Replies
8. Shell Programming and Scripting
Hi All,
I have this script below that checks rpm code version to Linux and Solaris servers.
The script is run using arguement ($1) which is server_list.txt. It runs as:
$ ./scriptname server_list.txt
#!/bin/bash
QUERY="/opt/rpm/bin/rpm -qa --queryformat '%{installtime}... (0 Replies)
Discussion started by: linuxgeek
0 Replies
9. Shell Programming and Scripting
I have a line that contains backslashes in which I want sed to substitute text with variables.
The line;
\\s008\2033330user$
I want to change this in \\s008.ourschool.com\2033330user$
I now use this script:
USER=2033330user
sed 's/\\'"$USER"'/.ourschool.com\\'"$USER/"
This doesn't... (3 Replies)
Discussion started by: Tubbie
3 Replies
10. Shell Programming and Scripting
Hi,
I have a variable read from user input:
PROFILESROOTDIR="\\194.185.82.188\CMSRepository\EncodingProfiles"
awk -F"=" -v gr=$PROFILESROOTDIR '/ProfilesRootDirectoryFromXOEMachine/{$2=gr;}1' OFS="=" $CFGFILE > "${CFGFILE}_new"
For this awk to work properly I need to replace in the... (7 Replies)
Discussion started by: potro
7 Replies