10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have an xml file and my aim is to grab each line in keywords file and search the string in another file.
When keyword is found in xml file,I expect the script to go to previous line in the xml file and grab the string/value between two strings. It's almost working with an error.
tab... (6 Replies)
Discussion started by: baris35
6 Replies
2. Shell Programming and Scripting
Hi,
I am newbie in unix.
Could someone tell me how do I redirect my grep output to a csv/excel ?
I have used below command but the outputs are appearing in one column Not in different column.
grep -e cmd -e cmd1 test.txt | cut -f 5 | sort | uniq -c> op.csv
I do not understand how do I... (14 Replies)
Discussion started by: kmajumder
14 Replies
3. Shell Programming and Scripting
Hello,
I would like to kindly ask you for help. I have a file with some lines in one row separated by semicolon. I need to find out, if the line I have in different variable is included in this file. e.g
I have a file foo.txt with lines
A=hello there;hello world;hello there world
In... (6 Replies)
Discussion started by: satin1321
6 Replies
4. Shell Programming and Scripting
Hi All,
I need to grep through a file for a string and print the next ten lines to a file separating the lines with a , and save it as a csv file to open it as a XL file. The 10 lines should be on a sigle row in xl.
Any suggesstions please.
Note; I dont have a GNU Grep to use -A flag.
... (6 Replies)
Discussion started by: Nani369
6 Replies
5. Shell Programming and Scripting
hi guys,
basically what i'm trying to do is fetching a set of columns from an oracle database like so...
my_row=`sqlplus -s user/pwd << EOF
set head off
select user_id, username from all_users where rownum = 1;
EOF`
echo $my_row
the code above returns...
1 ADSHOCKER
so then i... (3 Replies)
Discussion started by: adshocker
3 Replies
6. UNIX for Dummies Questions & Answers
Hi, i have this text:
X (m) 4917536.9627 4917536.9673 0.0090 -0.0046
Y (m) -815726.1383 -815726.1294 0.0061 -0.0089
Z (m) 3965857.4730 3965857.4840 0.0071 -0.0110
X (m) 4917536.9627 4917537.1411 -0.1784 0.1710
Y (m) -815726.1383 -815726.4859 0.3476 0.3489
Z (m) 3965857.4730... (2 Replies)
Discussion started by: limadario
2 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. Shell Programming and Scripting
hi,
i have a script where i am accepting a comma separated string from the user, i have to separated those strings on the basis of comma and store it in variables..
below is the script
#!/bin/ksh
clear
echo "Enter the strings seperated by commas :- \c "
read strn
echo $strn... (2 Replies)
Discussion started by: saharookiedba
2 Replies
9. Programming
Hi,
Well as the title says, I have an array of strings (delimited by null). The length of the array is variable and length of each string is variable as well. What I need is one huge string with the original strings in the array separated by spaces.
For example is an array is such that array... (12 Replies)
Discussion started by: newhere
12 Replies
10. UNIX for Dummies Questions & Answers
HI
In my script, i am reading the input from the user and want to find the length of the string.
The input may contain leading spaces. Right now, when leading spaces are there, they are not counted.
Kindly help me
My script is like below. I am using the ksh.
#!/usr/bin/ksh
echo... (2 Replies)
Discussion started by: dayamatrix
2 Replies