9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
i have a .csv file with only two columns, like:
Login;Status
Luca;S
Marco;
Stefano;
Elettra;S
Laura;
...
I need to replace the blank space on Status column whit Enabled end, on the same column, S whit Disabled, like:
Login;Status
Luca;Disabled
Marco;Enabled
Stefano;Enabled... (10 Replies)
Discussion started by: kamose
10 Replies
2. Shell Programming and Scripting
Hi All,
i have a file like
col1 col2 col3
13 24 NA
12 13 14
11 12 13
14 22 NA
18 26 NA
in this file if i found "NA" other values in the line are also replace by NA
Could you help me! (7 Replies)
Discussion started by: Shenbaga.d
7 Replies
3. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
4. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
5. Shell Programming and Scripting
Hello everyone,
I want to replace all "," (commas) with a blank space
My command thus far is:
cat test.text | sed -e s/\`//g | awk '{print$1" "$2" "$3}'
I'm sure you guys know this, but the SED command that I am using is to get rid of the "`" (tics).
which gives me:
name ... (5 Replies)
Discussion started by: jayT
5 Replies
6. Shell Programming and Scripting
My source is on each line
98.194.245.255 - - "GET /disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=&drc=&mo=&sid=&lang=EN&loc=JPN HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR... (5 Replies)
Discussion started by: elamurugu
5 Replies
7. Shell Programming and Scripting
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies
8. UNIX for Dummies Questions & Answers
I have a file:
$somevar=somevalue
$anothervar=
$someothervar=45
I'd like to be able to replace the values in the file. I just don't know how exactly to use sed. I was thinking along the lines of:
cat file | sed "s/$somevar=/anotherval/g"
I was hoping this would make the... (2 Replies)
Discussion started by: mrwatkin
2 Replies
9. Shell Programming and Scripting
I have file 1 with one million rows. one of the fields is
"FIRSTNAME" (the string)
I have a second file with about 20 first names.
JUDE
DAVID
HOMER
CANE
ABEL
MARTY
CARL
SONNY
STEVE
BERT
OSCAR
MICKY
JAMES
JOHN
GLENN
DOUG (3 Replies)
Discussion started by: yoyolandre
3 Replies