![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| reading XML datas via Shell Script | freepal | Shell Programming and Scripting | 1 | 02-08-2008 11:52 AM |
| reading data from excel using shell script | tiger99 | Shell Programming and Scripting | 11 | 01-06-2008 01:35 AM |
| reading command output from shell script | sri b | Shell Programming and Scripting | 4 | 11-16-2006 12:52 AM |
| Reading a table in a shell script | luiscarvalheiro | Shell Programming and Scripting | 13 | 08-10-2006 06:16 PM |
| Reading a CSV file into shell variables problem | multidogzoomom | Shell Programming and Scripting | 6 | 10-11-2005 04:43 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell Script -- problem reading backslash(\)!!
Hello! I am writing a program that reads a bunch of arguments from the command line,then read information from a file(passed as one of the arguments) and do some computation. The problem I am facing is when a backslash(\) is present as one of the arguments, suppose $ myprog \ abc xyz,the backslash is completely ignored, for the previous example $1 is "abc" where as it should be "\", I have tried using double-quotes("$1") but it still stays the same. The problem is the same when I am reading from a file the backslash character is completely ignored as if it were a space or a tab.
How can I prevent htis and read "\" as it is? Your help will be greatly appreciated. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|