Hello,
I have something that should be very simple yet I am losing my head in figuring out how to get it to work:
I am calling a function passing a parameter, this will return a particular string, next I want to substring the returned value and break it apart.
All of this I want to do on a single line of code under ksh93.
I tried a few combinations but I cannot get it to work. Any ideas?
I suppose I am doing something improper with the brackets and/or parentheses. Here is my one liner:
I would have expected the chunk:
to be the returned string from the function call executed, and include it in the substring statement, but no luck, I keep getting a parsing error.
Please post the code, the command line typed complete with the exact parameter, the expected output, and what actually happened - complete with any error messages verbatim.
I have a file in which there are other file path and names
/home/data/abc.txt
/home/data/sdf.txt
/home/data/sdg.txt
how can I get the file names i.e. abc.txt sdf.txt sdg.txt
I searched the forum for sed command but it was confusing to me (10 Replies)
Hi all,
I tried to find the reply using google, yet did not find a conclusive answer.
When I use 'find . -ls', I get something like:
3423297 8 -rw-r--r-- 1 useradmin staff 135 4 apr 09:46 ./.~lock.dir-file-list.csv#
I know that
3423297 is the inode
-rw-r--r-- ... (2 Replies)
Hey, geniuses of the world (no--facetious is NOT the word of the day;))!
I was wondering if there's a way to extract a specific portion from a string of characters in UNIX/LINUX. Give me the generic capabilities (assuming they exist) and I'll figure out the small details.
But if you know... (8 Replies)
Hi,
I have a scenario to just plug out the file name from the following location path.
/opt/project/data/int/holdFiles/csv195687.csv
So, how do I get just file name which is "csv195687.csv" from the above line using awk/shell scripting? Can we use indexOf and Substring in awk to get... (7 Replies)
Hi all
can i use unix variable holds the data returned by oracle in a shell script?
x=sqlplus -s u/p@h <<! >>fg.log
whenever sqlerr exit 1
select count(*) from schema.mat_view;
exit
!
echo $x
Will the $x return the value of count(*)?
thanks
megh (1 Reply)
The rdist command script is called in the program to synchronize the updated files, I wonder whether the rdist returned can be fetched or not from the program? (0 Replies)
Just so you know guys, I am a SAP Person and I am very new to UNIX. I need a help on a one line code.
In one of our script we are referring to a variable ($PN) which has the value /interfaces/DA1/DEV291/outbound/INVOIC which is being used in ftp command. I am just looking for a command to... (1 Reply)
Hi All,
Following is the output of a find commnd to locate log directories for various projects of UNIX AIX box:
/home/hbinz6pf/projectlibs/dpr_pfsdw_dev/&PH&
/opt/tools/ds/Template/&PH&
/data/ds/ms/hmsdw/projectlibs/dpr_ms_dev/&PH&
/data/ds/riskmi/projectlibs/dpr_riskmi_dev/&PH&... (5 Replies)
Hi All,
Following is the output of a find commnd to locate log directories for various projects of UNIX AIX box:
/home/hbinz6pf/projectlibs/dpr_pfsdw_dev/&PH&
/opt/tools/ds/Template/&PH&
/data/ds/ms/hmsdw/projectlibs/dpr_ms_dev/&PH&
/data/ds/riskmi/projectlibs/dpr_riskmi_dev/&PH&... (1 Reply)