10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/bin/bash
a=(*.pdf)
punct=((~`!@#$%^&*()_-+=|\{};':",./<>?))
for (( i =0; i < ${#a}; i++ ))
do
sed -ri 's/$punct//g' ${a}
done
I cannot use the above code, can you help me in removing all punctuation marks from file name except file extension. The idea is that once all... (9 Replies)
Discussion started by: ambijat
9 Replies
2. Shell Programming and Scripting
Hey all,
so I've been experimenting with SED today, no experience before today, so if you're not patient, stop reading now! :P
I will attempt to explain this as simply as possible, without having to post massive walls of shitty code. Basically, I've created a small sed script to go through an... (9 Replies)
Discussion started by: Parrakarry
9 Replies
3. UNIX Desktop Questions & Answers
I have different things that I was trying to do but am kind of struggling with this since I'm a Linux noob. I have a files with student names ,marks,year school the . What is the most efficient way to get a total count of students and student with highest marks
Initially I tried to get a count... (1 Reply)
Discussion started by: anil2103
1 Replies
4. Shell Programming and Scripting
for j in $(cat ${list_B})
do
to_replace_2=$(grep $j ${useralias}_2)
sed "s/^${j}/${to_replace_2}/p" ${entries} > ${entries}_2
mv ${entries}_2 ${entries}
done
Hi,
I've the above sed command running in a script. Its basically looping through a file and replacing its beginning of line... (8 Replies)
Discussion started by: Jazmania
8 Replies
5. Shell Programming and Scripting
Hi guys,
I'm currently trying to understand a piece of shell script and it has some sed commands. I've been looking through sed tutorials to figure out what it does but still no luck :confused:
Can any of you guys tell me what this particular command does?
sed -i '1i\.options' a/*
... (1 Reply)
Discussion started by: chu816
1 Replies
6. UNIX for Dummies Questions & Answers
So I have this sed command below. The content of the tmp.txt file is
dv01:at01,at05,at02:at04
sed 's/\:.*\,/\,/g' tmp.txt
Which produces
dv01,at02:at04
and I'm trying to use sed to get me
dv01,at05,at02
Stripping out the parts leading with ":". My sed is pretty basic, can... (5 Replies)
Discussion started by: J-Man
5 Replies
7. Shell Programming and Scripting
Here is an interesting problem that I am seeing when using 'sed'. The goal
is to print out the names of the Oracle SID's on a system and here is the
command I am using:
ps -ef|grep ora|grep pmon|awk '{print $NF}'|sed 's/ora_pmon_//'
The output of the command after the awk is this:
... (3 Replies)
Discussion started by: soleil4716
3 Replies
8. Solaris
I have a netscape 4.79 browser for our GUI which connects to a Solaris5.8 box. During peek hours, we see question marks appearing in the screen instead of the text we enter. This results in query failure. This problem does not happen always, and is quite irritating because, we have to close the... (6 Replies)
Discussion started by: vanz
6 Replies
9. AIX
Hi,
This is suman. I am very new to Shell Scripting. I have a shell script, when I run that script, it is displaying un necessary question marks. But in the scritpt, there is no any " echo ? " statement. Can anybody please help me what could be the cause for displaying question marks ??
... (3 Replies)
Discussion started by: clnsharma123
3 Replies
10. UNIX for Dummies Questions & Answers
I typed the following commands:
176 lab2-37:~> ed newb.txt
74
1,6p
Hello
Hello World.
I need some sentences to edit.
add the script
OK Fn
2,4c
.
1,3p
Hello
add the script
OK Fn
q
? (4 Replies)
Discussion started by: endeavour1985
4 Replies