Hi All
I have fired a command in linux
where file_name has
/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_info.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_jobs.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_ctrlmrmv_config.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_filerename_config.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_fileutil_config.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_filewatcher_config.csv
/data/ds/dpr_ebicm_uat/backfill/temp/etl_formatter_config.csv
when i do
echo $table i get following value
/data/ds/dpr_ebicm_uat/backfill/temp/purge_table_config.csv
whereas i need only purge_table_config which refers to the table name.
But the same command gives me the correct output in unix. But now as our project is migrating we are using linux.
Could you all please help me to modify this command so that it gives the output as only purge_table_config which is only the table name.
gawk splits the line into fields when the line is read - resetting FS afterwards (i.e. inside a procedure) doesn't change the field splitting (which is correct POSIX, iirc).
You can either set FS inside BEGIN, or use -F.
e.g.
Interpretation of awk command using index field in linux
Thanks it worked,
I have another question
Could you please tell me the interpretation of following command as to what output would it give me in linux
where VALUE=/data/ds/dpr_ebicm_uat/backfill/temp/etl_app_jobs.csv
I ran the command and it is giving me output as
0
0
0 likewise all zeros
I also need interpretation of following command
Thanks
like
I have taken this directly from the script, when i tried running it on linux its throwing me following error
-bash: 0: command not found
I also tried running this command separately VALUE=`echo ${VALUE} | sed -e 's/"//g'` it again throws a error like
-bash: command not found. Do these commands have a separate syntax in linux.
Please help me out with this. As the script is working different in linux enviornment
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
I have a script .sh with a curl command in it:
curl --digest "http://xxxxxxx.xxx/mail.php?email=xxxx@xxx.xx";
from terminal this works good :
./script.sh //(mail arrives in my box)
from php this works good:
shell_exec('./phpsc.sh'); // (mail arrives in my box)
from terminal this... (13 Replies)
Hi,
I have around 10 files in a folder in which I want to change the file format from tab(\t) to pipe(|) with some changes in the fields as well. Below is the code, while tmp file is getting generated but move command is not working, please help
Following is the code
awk -F"\t" '{print... (2 Replies)
Hi
I am working on linux machine and swap command is not working Linux Machine
On Solaris machine it is working fine:
uname -a
SunOS rgsm01 5.9 Generic_118558-03 sun4u sparc SUNW,Sun-Fire-V440
swap -s
total: 6596320k bytes allocated + 1035968k reserved = 7632288k used, 38893408k available
... (5 Replies)
I am using Linux RHEL5 64 bit and installed oracle 11g.
I want to check ODBC connection , i had modified odbc.ini file
when i use this command -isql
I am getting following error .
bash: isql: command not found
Kindly help (5 Replies)
dear All,
my awk system command isn't working or rather I'm missing something in my command. Appreciated , if anyone can assist me what exactly I'm missing ??
awk ' /^/ {
> c=split($3,a,"/") ;for(n=1; n<=c; ++n)
> {
> if (system("test -d" /home/cubedata/20120104/"$1"/"a")) {
> print... (5 Replies)
Hi
I tried running the code
scrname=`whence $0 | sed -e 's/\.\///g'`
where $0 is substituted by cm_dsjobrun.sh
in unix env then the value it returns me is
SCRNAME=/data/ds/dpr_ebicm_uat/etl/cm3_0/scripts/shell/cm_dsjobrun.sh
whereas i ran the same code on linux env
The value... (9 Replies)
Hi,
My code uses try_eval block to do some code execution. This piece of code does not work on RHEL 5.4. The program just hangs at the try_eval block and does not throw any errors either. The same program however works in other Linux boxes that we have.
I have written a simple program that... (0 Replies)
Hi all,
Trying to write a script that reads a file and prints everything after a certain string is found to the end of the file. Awk is giving me an error and not sure why it doesn't work:
# cat test_file
Mon Nov 16 2009 16:11:08
abc
def
Tue Nov 17 2009 16:08:06
ghi
jkl
Wed Nov 18... (8 Replies)
Hi,
I have written a c program to find cos() of a value , its not working, I am getting value of "val " as 0000.
#include<stdio.h>
#include<math.h>
main()
{
float val;
val = cosf( 1.570796);
printf("\nval = %f",val);
} (9 Replies)