10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
3. Shell Programming and Scripting
How do i cleanup a log file data every 2 days, I was using below command in a script to remove log file every 2 days, but looks like its not working as log file date and time gets updated every 5 mins. Is there a way ?
find ./ \( -name . -o -prune \) -type f -mtime -2 -name... (9 Replies)
Discussion started by: aix_admin_007
9 Replies
4. UNIX for Dummies Questions & Answers
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies
5. Red Hat
I have a server running redhat 5.5 and it has one SAN device presented to it as LUN9. How can I clean up the remaining entries. I cannot afford to interupt the service. Please assist.
# multipath -l
mpath0 (36000097000019260298953666633436) dm-11 EMC,SYMMETRIX
\_ round-robin 0
\_ 2:0:0:9 ... (2 Replies)
Discussion started by: Tirmazi
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to clean up data between parenthesis () in a file.
See example below....
Input File :
(New York) Chicago (London)
New York (Chicago) London
New York Chicago (London)
(New York) (Chicago) (London)
New York (Chicago)
... (3 Replies)
Discussion started by: msalam65
3 Replies
7. Shell Programming and Scripting
Hi All,
I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers.
I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err
Regards,... (0 Replies)
Discussion started by: shilpa_acc
0 Replies
8. Shell Programming and Scripting
Many of my servers' /etc/group file have many userid's that does not exist in /etc/passwd file and they need to be deleted.
This happened due to manual manipulation of /etc/passwd files.
I need to do this for 40 servers.
Can anyone help me in achieving this? Even reducing a step or two will be... (6 Replies)
Discussion started by: pdtak
6 Replies
9. Shell Programming and Scripting
I am trying to add a unique string to a variable to prevent some name space collisions.
DATAFILE=/u001/app/unica/affinium644/campaign/partitions/limited/tmp/ebf9aaah.t~#
DATETIME=`date +%Y%m%d_%H%M%S`
echo $DATAFILE > tmpnme.txt
sed 's_/_ _g' tmpnme.txt > tmpnme2.txt
DATA=$(cat tmpnme2.txt)... (2 Replies)
Discussion started by: whdr02
2 Replies
10. UNIX for Dummies Questions & Answers
What is the correct procedures to clean up /var/spool/mqueue? Any help appreciated. This directory gets really clogged up at times. :( :( (1 Reply)
Discussion started by: thomi39
1 Replies