Sponsored Content
Top Forums Shell Programming and Scripting While read line ignores the '\' in file content Post 302569388 by Prev on Monday 31st of October 2011 06:36:23 AM
Old 10-31-2011
Thanks

Thanks Ahamed, -r worked Smilie

---------- Post updated at 05:36 AM ---------- Previous update was at 05:23 AM ----------

One more thing please:
Code:
  echo $1  
  jobname=`echo $1 | awk -F',' '{print $1}'| awk -F'\' '{print $NF}'`
  echo "$jobname is jobname"

$1 is 'AM_DASHBOARD\MAIN\20RUN\RUNSURE_EEE, sequence job'
so jobname should be 'RUNSURE_EEE'
but I am getting output as 'AM_DASHBOARD\MAIN\20RUN\RUNSURE_EEE is jobname'
I have also tried:
Code:
echo $1 | awk -F',' '{print $1}'| awk -F'\\' '{print $NF}

but stil same

Any idea about this?

Last edited by Scott; 10-31-2011 at 07:48 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to read the content of the particular file from tar.Z without extracting?

Hi All, I want to read the content of the particular file from tar.Z without extracting. aaa.tar.Z contains a file called one.txt, I want to read the content of the one.txt without extracting. Please help me to read the content of it. Regards, Kalai. (12 Replies)
Discussion started by: kalpeer
12 Replies

2. Shell Programming and Scripting

read a file and use the content for mapping

help me pls.. :( i want to read a mapping file. Below is the content of my mapping file. 6221,189,SMSC1,OMC1,WAP1 6223,188,SMSC2,OMC2,WAP2 so when my program running msisdn="622130302310" while not EOF if substring($msisdn,1,4) == "6221" -- > "6221" read from the file then echo... (0 Replies)
Discussion started by: voidmain
0 Replies

3. Shell Programming and Scripting

Read a file content with awk and sed

Hello , I have huge file with below content. I need to read the numeric values with in the paranthesis after = sign. Please help me with awk and sed script for it. 11.10.2009 04:02:47 Customer login not found: identifier=(0748502889) prefix=(TEL) serviceCode=(). 11.10.2009 04:03:12... (13 Replies)
Discussion started by: rmv
13 Replies

4. Shell Programming and Scripting

read file content

i have one file abhi.txt its contents are home8/mc09ats/UnixCw/backup/file1 home8/mc09ats/file2 i want to read this content of file using while loop.. in this i want to seperate the content as follows path=home8/mc09ats/UnixCw/backup file=file1 echo path echo file can you... (1 Reply)
Discussion started by: AbhijitIT
1 Replies

5. Shell Programming and Scripting

bash: read file line by line (lines have '\0') - not full line has read???

I am using the while-loop to read a file. The file has lines with null-terminated strings (words, actually.) What I have by that reading - just a first word up to '\0'! I need to have whole string up to 'new line' - (LF, 10#10, 16#A) What I am doing wrong? #make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies

6. Shell Programming and Scripting

How to read file and only output certain content

Hi - I have a file containing data like :- cn=tommy,cn=users,c=uk passwordexpirydate=20100530130623z cn=jane,cn=users,c=uk passwordexpirydate=20100423140734z cn=michael,cn=users,c=uk passwordexpirydate=20100331020044z I want to end up with a file that looks like:-... (6 Replies)
Discussion started by: sniper57
6 Replies

7. Shell Programming and Scripting

Read a text file and print the content..

hello all i request you to give the solution for the following problem.. I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print g go goo goog googl google like this Using unix Shell scripting... ... (7 Replies)
Discussion started by: samupnl
7 Replies

8. Shell Programming and Scripting

cut the variable from the line and use it to find the file and read the content of that file

Hi, I am working on one script..I am having files in the below format file 1 (each line is separated with : delimeter) SPLASH:SPLASH:SVN CIB/MCH:MCH:SVN Now I want from file 1 that most left part of the first line will store in... (6 Replies)
Discussion started by: rohit22hamirpur
6 Replies

9. How to Post in the The UNIX and Linux Forums

GREP function in ksh which ignores LINE Breaks

I am using a grep command with two patterns in my KSH script. File has line breaks in it and both the patterns are in different lines. Here is the command - grep -l 'RITE AID.*ST.820' natriter820u.20140914 Pattern1 - RITE AID Pattern2 - ST*820 I am not getting any results from this,... (3 Replies)
Discussion started by: Raghav Garg
3 Replies

10. UNIX for Dummies Questions & Answers

GREP function in ksh which ignores LINE Breaks

Hello I am using a grep command with two patterns in my KSH script. File has line breaks in it and both the patterns are in different lines. Here is the command grep -l 'RITE AID.*ST.820' natriter820u.20140914 Pattern1 - RITE AID Pattern2 - ST*820 I am not getting any results from... (24 Replies)
Discussion started by: Raghav Garg
24 Replies
prepmx(1)							prepmx Manual Page							 prepmx(1)

NAME
prepmx - preprocessor for PMX, easy music typesetting program SYNOPSIS
prepmx [options] jobname [outdir/] [stylefile] DESCRIPTION
M-Tx is an easy to use preprocessor language for the PMX music typesetting program, aimed at people who are not experts. For an easy exam- ple, have a look at the following example: c2+ e4 g | b4d- c1 d c2 | c8 g+ e g c- g+ e g | d g f g c- g+ e g | For syntax reference, please look at the M-Tx manual written by Dirk Laurie, the creator of the M-Tx language and the author of prepmx, its command line utility. prepmx processes the file jobname.mtx to generate jobname.pmx. You can then process this file using the `pmx' command. PMX is a pre- processor for MusiXTeX. outdir/ is the directory where `pmx' will put the final .tex file. Note that the trailing slash is mandatory. You can provide a stylefile for M-Tx. If omitted, the file `mtxstyle.txt' in the current directory is used, if there is one. OPTIONS
Options can also be specified in a `Options:' line in the preamble, which takes precedence over the command line. -b never unbeam eighth notes and shorter -c main music lines only - ignore chords -D enable debug mode -f use tonic sol-fa note names -i ignore errors -m music only - ignore lyrics -n indent first system and print default instrument names -t ignore uptext lines -u uptext synchronizes with notes only, not rests -v verbose progress report -w enable pedantic warnings -n select specified case of multiple score EXIT STATUS
If no error was found, prepmx exits with return code 0. In case of an error, the line number of the processed line is returned. This may not always be the line containing the actual error. A return status of 10000 means that the input file was empty or could not be opened. SEE ALSO
M-Tx User's Guide (/usr/share/doc/m-tx/mtxdoc.pdf.gz on a Debian system) pmx(1), musixtex(1) AUTHORS
prepmx was written by Dirk Laurie <dlaurie@na-net.ornl.gov>. This manual page was written by Roland Stigge <stigge@antcom.de> for the Debian project. It was revised and extended by Nis Martensen <nis.martensen@web.de>, mostly by copying text from Dirk Laurie's M-Tx User's Guide. M-Tx Version 0.60 01 September 2005 prepmx(1)
All times are GMT -4. The time now is 04:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy