10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
Below is my input file with "|" (pipe) as filed delimiter:
My Input File:
HDR|F1|F2||||F6|F7
I want to inser values in the record for field 4 and field 5.
Expected output
HDR|F1|F2||F4|F5|F6|F7
I am able to append the string to the end of the record, but not in between the... (3 Replies)
Discussion started by: Ajay Venkatesan
3 Replies
2. Programming
Right I have a MYSQL database with table1 with 3 columns, colA, colB and colC. I want to combine the data in the 3 columns into a 4th column names col_comb. Here's the SQL command that works:
UPDATE table1 SET `col_comb` = CONCAT( `colA` , ' - ', `colB` , ', ', `colC` );
So now I want this... (5 Replies)
Discussion started by: barrydocks
5 Replies
3. Shell Programming and Scripting
Hi Forum.
I'm struggling to find a solution for the following issue.
I have multiple files a1.txt, a2.txt, a3.txt, etc. and I would like to insert a tab-delimited header record at the beginning of each of the files.
This is my code so far but it's not working as expected.
for i in... (2 Replies)
Discussion started by: pchang
2 Replies
4. Shell Programming and Scripting
I have a file as:
1
New
used
1
used
New
I need o/p as:
'1'
'New'
'used'
'1'
'used'
'New' (12 Replies)
Discussion started by: karumudi7
12 Replies
5. Shell Programming and Scripting
Hi experts,
.history can record one user's own command history, but my request is,
I want to record all users who run commands on that box, and export the commands to a file somewhere, which record the userid, time and full command.
Is it possible? I just need for audit, and trace back, if... (3 Replies)
Discussion started by: newoz
3 Replies
6. Shell Programming and Scripting
Hi All,
I have created a script to capture process run by the user & put into to mysql DB.
But some how i am anot able to insert output of ps aux as below sting in mysql db.
######################################... (2 Replies)
Discussion started by: ajaincv
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
Well my title isn't very clear I think. So to understand my goal:
I have a script "test1"
#!/bin/bash
xvkbd -text blabla
with xbindkeys, I bind F5 key in order it runs my test1 script
So when I press F5, test1 runs.
I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies
8. UNIX for Dummies Questions & Answers
I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename?
#!/bin/bash
filename=`echo $0`
/usr/bin/sed '/#include/ {
i\
the filename is `$filename`
}' $1
exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies
9. Shell Programming and Scripting
Hi ,
I have a table of 5 records. I am using FOR condition in this table. Using FOR , I want to copy those particular record into someother file which satisfies the condition. How to use 'cp' command in this situation in UNIX
For Ex
No Prod Price Bar Code
1 Colgate 23 34564 col
2... (5 Replies)
Discussion started by: devmns
5 Replies
10. Shell Programming and Scripting
I have a fixed width flatfile with 5 columns, i will load file from oracle database to the flatfile for every 15 min at the end of the file, i want to insert a record by calling a shell script for inserting a record.
please can any one help me.
Thanks. (1 Reply)
Discussion started by: limou
1 Replies