10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I have string (string can have more sections)
LINE="AA;BB;CC;DD;EE"I would like to assigne each part of string separated by ";" to some new variable.
Can someone help? (4 Replies)
Discussion started by: vikus
4 Replies
2. Shell Programming and Scripting
cat file
time="north_south_east_west_08:00" location="A" start="left" status="ok" end="north"
time="north_south_east_west_12:00" location="C" start="right" status="ok" end="south"
time="north_south_east_west_23:00" location="G" start="left" status="ok" end="east"... (7 Replies)
Discussion started by: ctphua
7 Replies
3. Shell Programming and Scripting
I'm attempting a little hack to get grep to highlight (change foreground color to red) a found string. Assuming a target file "test" consisting of the word "albert":
My executable "algrep" consists of this:
grep $1 $2 | sed "s/$1/\\\033
And when run:
algrep al test
Produces this:... (2 Replies)
Discussion started by: tiggyboo
2 Replies
4. Shell Programming and Scripting
I want to append the following line to /var/spool/cron/root:
*/7 * * * * /root/'Linux CPU (EDF).sh' > /dev/null 2>&1
How to accomplish this using echo?
---------- Post updated at 04:09 PM ---------- Previous update was at 04:07 PM ----------
"Linux CPU (EDF)" is actually stored in a... (11 Replies)
Discussion started by: proactiveaditya
11 Replies
5. Shell Programming and Scripting
All I'm trying to split a string at the $ into arrays
@data:=<dataFile>
a $3.33
b $4.44
dfg $0.56
The split command I have been playing with is:
split(/\$/, @data)
which results with
a .33 b .44 dfg .56
any help with this is appreciated
/r
Rick (9 Replies)
Discussion started by: schultz2146
9 Replies
6. Shell Programming and Scripting
Hi All,
I am having a trouble in passing special characters to a script. As I am new to bash script I dont know how to go and solve this.
mypwd=(a+sdfg!h#
if i pass $mypwd to a bash script, it is not accepting "(,!,+ etc". It would be a great help if some one can help to escape these... (3 Replies)
Discussion started by: Tuxidow
3 Replies
7. Shell Programming and Scripting
I'm running into a problem with a differential backup script written in GNU Bash 3.0 - the following stripped down code demonstrates the problem quite nicely.
$ DATE="last tuesday"
$ date --date="$DATE"
Tue Jan 6 00:00:00 PST 2009
So far so good.
$ CMD="date --date=\"$DATE\""
$... (6 Replies)
Discussion started by: vertigo23
6 Replies
8. Shell Programming and Scripting
Hi,
I am writing a Perl script that reads in many lines, if a line meets the criteria I want to edit, it. For example, the script will return the following example line... test=abc123
All I want to do is strip off the "test=" and just be left with the abc123. In my script I can easily... (3 Replies)
Discussion started by: edrichard
3 Replies
9. Shell Programming and Scripting
Hi All,
In ksh script i'm trying to assign "sqlstmt1" varaible value,
update VAREntryTb set VAR10num = VAR1num * Mltplr where BusD = '$val1' and RunI = 1"`
Hence i wrote below statement, the issue with this is shell is expanding "*" character adn thus subistuting it with the content of my... (6 Replies)
Discussion started by: arvindcgi
6 Replies
10. Shell Programming and Scripting
dear, I would like to rename files in a dir to another format, so I write a bash shell script to handle it. But my problem now is how to handle files having special characters like spaces, (, ):
"a b c (d).doc"
It seems that I need to escape those characters before applying the "mv" command.... (1 Reply)
Discussion started by: lau0001
1 Replies