10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to run sql query in shell script and output data save as delimited text (delimited text would be comma)
Code:
SPOOL_FILE=/pgedw/dan.txt
SQL=/pgedw/dan.sql
sqlplus -s username/password@myhost:port/servicename <<EOF
set head on
set COLSEP ,
set linesize 32767
SET TRIMSPOOL ON
SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies
2. Shell Programming and Scripting
Input file:
xyz,pqrs.lmno,NA,NA,NA,NA,NA,NA,NA
abcd,pqrs.xyz,NA,NA,NA,NA,NA,NA,NA
Expected Output:
xyz pqrs.lmno NA NA NA NA NA NA NA
abcd pqrs.xyz NA NA NA NA NA NA NA
Command Tried so far:
awk -F"," 'BEGIN{OFS=" ";} {print}' $File_Path/File_Name.csv
Issue:... (5 Replies)
Discussion started by: TechGyaann
5 Replies
3. Shell Programming and Scripting
Hi Experts,
I have a tab deliminated file as below
myfile.txt
Local Group Memberships *Administrators *Guests
I need data in below format starting from 4th position.
myfile1.txt
Administrators Guests
the above one is just an example and there could... (15 Replies)
Discussion started by: Litu1988
15 Replies
4. Shell Programming and Scripting
Hi,
I have a data like
Input:
12||34|56|78
Output:
XYZ|12||34|56|78
I tried like this , but it puts it on another line
awk -F "|" ' BEGIN {"XYZ"} {print $0} 'file
Any quick suggessitons in sed/awk ? am using HP-UX (3 Replies)
Discussion started by: selvankj
3 Replies
5. Shell Programming and Scripting
Hi,
This is a vcd file.A vcd file may have 'n' modules.
1) I need to capture the data in bold,i.e. the module names (shown in bold)
2) Also i need to capture the data inside each individual module,say for tst_bench_top ,i need to capture data from line 4 to line 20 ...
I just want one... (2 Replies)
Discussion started by: veerabahu
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to move a column from one position to another position in a delimited file. The positions are dynamic in nature and are available by environmental variables. Also the file can have n number of columns.
Example:
Initial Column Position=1
Final Column Position=3
Delimiter='|'
... (2 Replies)
Discussion started by: ayan153
2 Replies
7. Shell Programming and Scripting
using awk to substitute data in a column delimited text file
hello i would like to use awk to do the following calculation from the following snippet.
input file
C;2390 ;CV BOUILLOTTE 2L 2FACES NERVUREES ;1.00 ;3552612239004;13417 ;25 ;50 ; 12;50000 ; ; ... (3 Replies)
Discussion started by: iindie
3 Replies
8. Shell Programming and Scripting
All,
I am trying to run a command that will get the serial number, model, and hostname of a server and then output the 3 fields comma delimited.
Then a new line to separate the 3 fields for each host.
So, I run a for loop that reads in the list of hosts in a file and then runs these sudo... (0 Replies)
Discussion started by: markdjones82
0 Replies
9. Shell Programming and Scripting
Hi,
I am quite new to shell scripting in Linux. Please help me in solving the given problem.
I have file called Data.txt
File "Data.txt" looks like
India|9990000|City
England|888800|London
Nigeria|9887766|uganda
I need to get the data after first pipe till second pipe into file... (2 Replies)
Discussion started by: ashu_r2001
2 Replies
10. Shell Programming and Scripting
Hi All,
Please help me out with a script which checks whether a given file say abc.txt is in ASCII format and data is tab-delimited. If the condition doesn't satisfy then it should generate error code "100" for file not in ASCII format and "105" if it is not in tab-delimited format.
If the... (9 Replies)
Discussion started by: Mandab
9 Replies