Sponsored Content
Full Discussion: Zero typing problem!
Top Forums Shell Programming and Scripting Zero typing problem! Post 302718161 by pamu on Friday 19th of October 2012 08:29:44 AM
Old 10-19-2012
Try using double quotes..

Code:
#!/bin/sh
str=$@
echo "$str" | sed 's/.*\\//'
exit 0

@Jim

I think we can directly do like this also(Don't know is there any problem with SolarisSmilie)

Code:
echo "$str" | nawk -F '\' '{ print $NF}'

 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Hiding Passwords while typing..

Hi, We need ur advice,... We are integrating our application (oracle) with OID,and OID is with another team. While integrating they have to provide their 'ADMIN-password' when the script prompts ,But the password they are about type is visible. If this is the case they are denying it,.... Is... (1 Reply)
Discussion started by: rrs
1 Replies

2. UNIX for Dummies Questions & Answers

Stuck after typing goto

uname -a returns: SMP Tue May 17 17:52:23 EDT 2005 i686 athlon i386 GNU/Linux I have many aliases beginning with "goto" so... if I type goto and then hit return (oops) A goto prompt pops up and I cant exit from it(I tried MANY key seqs) The only way to exit is to kill the term window... (2 Replies)
Discussion started by: rairey
2 Replies

3. UNIX and Linux Applications

Learn typing in Chinese

I have a burning desire to learn how to type in chinese (and after, probably with success, in another languages). How to do this, all symbols are needed, and methods of input also. And a map of chinese keyboar layout will be helpful. I want very much study program. (3 Replies)
Discussion started by: Xcislav
3 Replies

4. Shell Programming and Scripting

No output to CL when typing in CL.

Hello all, I am in a terminal on Solaris and something weird is happening... When I am typing I can't see what I am typing, although what I am typing is working. As is if I type the command and hit enter, the command runs. Anyone have a clue why or how I can make it display my typing? Is... (2 Replies)
Discussion started by: komputersman
2 Replies

5. UNIX for Advanced & Expert Users

Determining typing latency

Hi all, When I use an editor (vi) that is spawned in a remote server, visually I could see the latency between typing a character/word and being displayed on the terminal. I could see this visually but how do I get a metric on this or how to quantify this? As expected, when I type in a editor... (6 Replies)
Discussion started by: matrixmadhan
6 Replies

6. UNIX for Dummies Questions & Answers

No $ when typing cw

Hi As a dummy my question is very simple. When typing cw I've read (many times) that a '$' should appear at the end of the word I'm about to change. However, it doesn't, and in my case the word is instantly deleted and so ready to be changed! Can somebody tell me why this is, or maybe I... (4 Replies)
Discussion started by: joesh
4 Replies

7. HP-UX

@ typing creates new line

Dear Concern, Please go through the article https://www.unix.com/hp-ux/134072-typing-sign-creates-new-line.html As per the article, we need to initiate below commands. But after creating new session, we face same problem. Please advise. stty intr "^c" stty kill "^u" Please find below... (6 Replies)
Discussion started by: makauser
6 Replies
DtDtsDataToDataType(library call)										 DtDtsDataToDataType(library call)

NAME
DtDtsDataToDataType -- get the data type for a set of data SYNOPSIS
#include <Dt/Dts.h> char *DtDtsDataToDataType( const char *filepath, const void *buffer, const int size, const struct stat *stat_buff, const char *link_path, const struct stat *link_stat_buff, const char *opt_name); DESCRIPTION
The DtDtsDataToDataType function determines the data type of a set of data, based on the information given in the non- NULL pointer argu- ments to the function. The function gathers any additional information, if it is needed, to compensate for the NULL arguments. For exam- ple, if the filepath argument is given, but the stat_buff argument is NULL and a stat_buff value is required to determine the data type, DtDtsDataToDataType calls the stat(2) function to obtain the information. The filepath argument is the pathname of a file. The buffer argument is a pointer to the buffer of the data to be typed. The size argument is the size of the buffer in bytes. The stat_buff argument is the buffer returned from a stat(2) or fstat(3) call for use in typing. The link_path argument is the pathname of the target file pointed to by a symbolic link. The link_stat_buff argument is the buffer returned from an lstat(2) call for use in typing. The opt_name argument can be used to specify a name to be associated with the buffer. If the opt_name argument is not NULL, it is used as a pseudo file name in typing; otherwise, certain attributes may be returned as NULL because the filename components could not be deter- mined. RETURN VALUE
Upon successful completion, the DtDtsDataToDataType function returns a pointer to a data type string, or NULL if no value could be deter- mined. APPLICATION USAGE
The DtDtsDataToDataType function is generally used by applications such as file managers to improve performance. Typical applications should probably use DtDtsFileToDataType(3) or DtDtsBufferToDataType(3) instead. The DtDtsBuffer* functions assume that the buffer is readable and writable by the user, group and other file classes and select a type accordingly. An application requiring a type based on read-only permissions should use DtDtsDataToDataType with a stat_buff value created for this purpose: all fields should NULL except for the st_mode field, which should be set to: S_IFREG | S_IROTH | S_IRGRP | S_IRUSR SEE ALSO
Dt/Dts.h, DtDtsLoadDataTypes(3), DtDtsFileToDataType(3), DtDtsBufferToDataType(3), fstat(3), lstat(2), stat(2). DtDtsDataToDataType(library call)
All times are GMT -4. The time now is 09:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy