Sponsored Content
Full Discussion: cut command
Top Forums Shell Programming and Scripting cut command Post 302342957 by kojo on Tuesday 11th of August 2009 06:39:03 AM
Old 08-11-2009
Quote:
Originally Posted by scottn
You forgot the code tags again ;-)

Change this line:

Code:
$UXEXE/uxext tsk ses=$s vses=* upr=* model mu=$p `output=$p_$s.pnf` APP

To

Code:
$UXEXE/uxext tsk ses=$s vses=* upr=* model mu=$p output=${p}_$s.pnf APP

You have to separate the two variables p and s otherwise all you'll get is the value of s.

And I removed the ` backticks around output=

What were they for?
Hello

You are right it is working and giving the output of first input of first line of input file but now why it is not going to second line of input file ,it must go to 2nd line and than should give 2 output like that till end of my input file
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

CUT Command

Hi, Can anyone tell me if I can apply multiple cut on a single variable like below in a sh script: tmp=`cut -c 1-4 $val` tmp1=`cut -c 5-12 $val` tmp2=`cut -c 13-18 $val` If not, what is the other way to do this. Thanks and Best Regards Shoeb (17 Replies)
Discussion started by: shoeb_syed
17 Replies

2. UNIX for Dummies Questions & Answers

Cut Command help

Hi , I am new to Unix.I have a shell script whenere I wnat to find if a particular server is running and kill all the instances of it (running on different ports) script filename to start the srever is say abcd If i do ps -eaf | grep abc I get all the instances of srever running .In the... (1 Reply)
Discussion started by: shradham
1 Replies

3. AIX

Use of Cut Command

Hi All, Can anyone tell me how to use cut command?I have tried but its not working...Please find the details below : $ cat file1 SlNo. E_ID E_Name Age Dept 1 123 A 20 Electrical 2 124 B 20 Electronics 3 125 C 24 Computer 4 126 D 23 Mechanical ... (3 Replies)
Discussion started by: Puja Sharma
3 Replies

4. Shell Programming and Scripting

cut command help

n2=user1 pts/3 2010-06-29 01 Now i want to split this string with space(' ') character. After splitting output would be: use1 pts/3 2010-06-29 01 I did: nn=${n2} | cut -d ' ' -f2 echo ${nn} It prints nothing. I want the output: pts/3 (2 Replies)
Discussion started by: cola
2 Replies

5. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

6. UNIX for Dummies Questions & Answers

Cut pid from ps using cut command

hay i am trying to get JUST the PID from the ps command. my command line is: ps -ef | grep "mintty" | cut -d' ' -f2 but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that. i know i can use awk or cut... (8 Replies)
Discussion started by: ran ber
8 Replies

7. AIX

Need help on cut command

HI, i have data in one variable like out=/usr/sbin/filename and i want output like only out=filename how to do (5 Replies)
Discussion started by: sumanthupar
5 Replies

8. Shell Programming and Scripting

Cut command

Hi All, I am a beginner learning shell script, Would it be possible to use -c and -f in cut command together ? Example : /opt/oracle/work/Antony/Shell_Script> cat shortlist 2233|a.k. shukula |g.m. |sales2 |12/12/52 |6000 1006|chanchal singhvi ... (3 Replies)
Discussion started by: Antony Ankrose
3 Replies

9. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
MAKEPSRES(1)						      General Commands Manual						      MAKEPSRES(1)

NAME
makepsres - Build PostScript resource database file. SYNOPSIS
makepsres [ options ] directory ... DESCRIPTION
makepsres creates PostScript language resource database files. Resource database files can be used to specify the location of resources that are used by the font selection panel and other Adobe software. For a complete description of the resource location facilities in the Display PostScript system, see Appendix A and Appendix B of "Display PostScript Toolkit for X" in Programming the Display PostScript System with X. makepsres creates a resource database file named PSres.upr that contains all the resources in all the directory path names specified on the command line. If the list of directories contains - , makepsres reads from stdin and expects a list of directories separated by space, tab, or newline. If the list of directories is empty, it is taken to be the current directory. If all specified directories have a common initial prefix, makepsres extracts it as a directory prefix in the new resource database file. makepsres normally acts recursively; it looks for resource files in subdirectories of any specified directory. This behavior can be over- ridden with the command line option -nr. makepsres uses existing resource database files to assist in identifying files. By default, makepsres creates a new resource database file containing all of the following that apply: Resource files found in the directories on the command line. Resource files pointed to by the resource database files in the directories on the command line. Resource entries found in the input resource database files. These entries are copied if the files they specify still exist and are located in directories not specified on the command line. If you run makepsres in discard mode (with the -d option), it does not copy resource entries from the input resource database files. In that case, the output file consists only of entries from the directories on the command line. The input resource database files are only used to assist in identifying files. If you run makepsres in keep mode (with the -k option), it includes in the output file all resource entries in the input resource database files, even entries for files that no longer exist or are located in directories specified on the command line. makepsres uses various heuristics to identify files. A file that is of a private resource type or that does not conform to the standard format for a resource file must be specified in one of the following ways: By running makepsres in interactive mode By preloading the file into a resource database file used for input By beginning the file with the following line: %!PS-Adobe-3.0 Resource-<resource-type> OPTIONS
-o filename Writes the output to the specified filename. The construction "-o -" writes to stdout. If the -o option is not specified, makepsres creates a PSres.upr file in the current directory and writes the output to that file. -f filename Uses information from the specified file to assist in resource typing. The file must be in resource database file format. Multiple -f options may be specified. The construction "-f -" uses stdin as an input file and may not be used if "-" is specified as a direc- tory on the command line. -dir dirname Specifies that dirname is a directory. Needed only in rare cases when dirname is the same as a command-line option such as -nb. -d Specifies discard mode. The resulting output file consists solely of entries from the directories on the command line. -e Marks the resulting PSres.upr file as exclusive. This option makes the resource location library run more quickly since it does not have to look for other resource database files. It becomes necessary, however, to run makepsres whenever new resources are added to the directory, even if the resources come with their own resource database file. -i Specifies interactive mode. In interactive mode, you will be queried for the resource type of any encountered file that makepsres cannot identify. If -i is not specified, makepsres assumes an unidentifiable file is not a resource file. -k Specifies keep mode. -nb If the output file already exists, do not back it up. -nr Specifies nonrecursive mode. makepsres normally acts recursively: it looks for resource files in subdirectories of any specified directory. If -nr is used, makepsres does not look in subdirectories for resource files. -p Specifies no directory prefix. If -p is used, makepsres does not try to find a common directory prefix among the specified directo- ries. -q Quiet mode: ignores unidentifiable files instead of warning about them. -s Specifies strict mode. If -s is used, makepsres terminates with an error if it encounters a file it cannot identify. EXAMPLES
makepsres . Creates a resource database file that contains all the resources in the current directory. makepsres -i -o local.upr /usr/local/lib/ps/fonts Runs makepsres in interactive mode and creates a resource database file named local.upr, which contains all the resources in the directory /usr/local/lib/ps/fonts. SEE ALSO
Programming the Display PostScript System with X (Addison-Wesley Publishing Company, Inc., 1993). AUTHOR
Adobe Systems Incorporated NOTES
PostScript and Display PostScript are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions. Copyright (c) 1989-1994 Adobe Systems Incorporated. All rights reserved. Adobe Systems 13 May 1993 MAKEPSRES(1)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy