10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to delete all matches in a text following this pattern:
Each match starts with linux-
Each match ends with a space
(Remove linux-* until immediate next space)
EXAMPLE:
From this text:
ibudev1 libudev1 libweather-ion7 libxatracker2 linux-generic linux-headers-generic... (4 Replies)
Discussion started by: Tribe
4 Replies
2. Shell Programming and Scripting
How can i comparing string's whith blank spaces?
I have this problem:
DIF1="STRING 1212"
DIF2="STRING 1212"
if
then
echo "Differents"
else
echo "Equals"
fi
Error:
1212}: unknown test operator (3 Replies)
Discussion started by: Xedrox
3 Replies
3. Shell Programming and Scripting
Hello Gurus,
I've searched enough to find what I wanted and finally ended up creating a thread.
I'm in the process of coding something like below
sed -n -e "s/.*\(successfully completed\).*/\1/p" xxx.log
read status
if ]
then
#sleep 3;
echo "Export... (4 Replies)
Discussion started by: rajivan
4 Replies
4. Shell Programming and Scripting
hi,
I have this string:
a="abc def ghi jkl mno pqr"
how can I display this to:
abc def ghi jkl mno pqr # only one space each (14 Replies)
Discussion started by: h0ujun
14 Replies
5. Shell Programming and Scripting
I have a customer file now and would like to separate the names into two cells in a spreadsheet. Here is my data as an example:
SHAWN R KEEGAN
shawn r scroggin
Shawn Regan
Shawn Reilly
The first two have the middle initial so I'd like to include them in the "first name" field and the last... (11 Replies)
Discussion started by: Grassy
11 Replies
6. Shell Programming and Scripting
I'm trying to replace a string "99999999'" with the blank where ever is there in the file. Could you please help in unix scripting.
Thank You. (6 Replies)
Discussion started by: vsairam
6 Replies
7. Shell Programming and Scripting
hi i have a file content like
my_file:
1US8738297897918000
000
000
i used
while IFS= read line
do
echo "$line" | grep '^\
then
last=`echo "$line" | cut -c 3-20`
echo "$last"
fi
done < $my_file
but it is writing blank spaces into the o/p fie (1 Reply)
Discussion started by: Satyak
1 Replies
8. UNIX for Dummies Questions & Answers
Hello
I have this string
XYZ-ABC
DFT-ERT
QWE-TYU
I want to get the part after the dash. how to do that?
thanks (2 Replies)
Discussion started by: melanie_pfefer
2 Replies
9. UNIX for Dummies Questions & Answers
hi all
how do i check if a string consist of any space by using shell script.
i have the following code
while test -z $string
do
//prompting for another string if string is length 0
done
when i type "a b" it give me an error
test: a: binary operator expected
thanks (7 Replies)
Discussion started by: yang
7 Replies
10. Shell Programming and Scripting
Hi all
I am trying this simple command:
a="abc abc"
echo $a
output is: abc abc
But expected output shoould be :abc abc
i.e spaces in real string are geting truncated to one space everytime.
Plz Help. (4 Replies)
Discussion started by: rahul303
4 Replies