i am trying to match filenames and modify the files internally depending on the match
the filenames are something like this
cm01FEB2012bhav
cm01AUG2012bhav
...
Internally the file(cm01FEB2012bhav) looks like this
Here i am trying to replace 01-FEB-2012 with 01/02/2012(the filename is cm01FEB2012bhav).As you can see the filename and this field are almost the same.
I have written the code for matching the file cm01FEB2012bhav. I intend to write such if statements for all 12 possibilities(JAN,FEB,MAR...).However the first if statement is only not working .
Any help in solving this problem is appreciated
Using the awk below I am able to combine all the matching dates in $1, but I can not seem to remove the non-matching from the file. Thank you :).
file
20161109104500.0+0000,x,5631
20161109104500.0+0000,y,2
20161109104500.0+0000,z,2
20161109104500.0+0000,a,4117... (3 Replies)
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Hi, I have text file:
Name: xyz
Gender: M
Address: "120_B_C; ksilskdj; lsudlfw"
Zip: 20392
Name: KLM
Gender: F
Address: "65_D_F; wnmlsi;lsuod;,...."
Zip:90233I want to insert 2 new lines before the 'Address: ' line deriving value from this Address line value
The Address value in quotes... (1 Reply)
Hi,
I want to check all files in a folder for some specific start string and append all matching filenames with _1, _2 .... for each file found in the directory.
But, $file below gives me all details of the files like access permissions, owner and filename etc. I just want all the filenames... (3 Replies)
I have the htaccess file within the folder in the domain I want to deny access to all users, execept one IP, after that
redirects Error 403 resulting to a 404 error custom html page as shown below.
# Restringting access!
deny from all
allow from 204.127.111.105 # Example of allowed IP... (1 Reply)
Hi
The script:
#!/bin/sh
#set -x
# set admin email so that you can get email
ADMIN="myemailaddress"
# set alert level
ALERT=4
df -HP | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output;
do
#echo $output
usep=$(echo $output | awk '{ print... (5 Replies)
Hi all,
I have 4 files for example named
abc01012009.txt
abc02012009.txt
abc03012009.txt
abc04012009.txt
in a folder. I would like to firstly backup the latest file available, in this case, the latest date available, abc04012009.txt to its subfolder named backup, and then rename the... (4 Replies)
I am unable to send mail externally. It gets refused from any mail server.
Here's my current config:
oslevel -s
5300-07-05-0831
********
mail -v foo@yahoo.com < /tmp/oracle.out
Warning: .cf file is out of date: sendmail AIX5.3/8.13.4 supports version 10, .cf file is version 9... (3 Replies)
OK this is what I want to do:
On server1 I want to type <ping server2> and be able to get:
pinging 192.168.0.12 ...... etc.
and by server2, I mean one-word, not server2.example.com
I know if I add the addresses to /etc/hosts I can achieve this, but I would like to not have to update all... (2 Replies)