Sponsored Content
Full Discussion: Cutting Part of Output
Top Forums Shell Programming and Scripting Cutting Part of Output Post 302472503 by lee.n.doan on Wednesday 17th of November 2010 09:51:22 AM
Old 11-17-2010
So if I used -d".", how could I get, say the 5th or 6th part?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cutting part of string

Hi, I wanted to cut a specific portion from given string. How would I do that? Example: /u09/core/inbound/abc.txt is my string. I want abc.txt in a variable. Please help me. Regards, Dhaval (3 Replies)
Discussion started by: dhaval_khamar
3 Replies

2. Shell Programming and Scripting

Redirecting part of output to stdout

Hi, I am trying to execute a command like this: find ./ -name "*.gz" -exec sh -c 'zcat {} | awk -f parse.awk' \; >> output If I want to print the filename, i generally use the -print argument to the find command but when I am redirecting the output to a file, how can I print just the... (2 Replies)
Discussion started by: Legend986
2 Replies

3. Shell Programming and Scripting

need a part of output data as output

HI Guys, I need some expert help.. i have this below data as input WHERE StartTime >= '2010-03-24 20:10:08' AND username in('abc_xxx_yyy_01') and output need is just in appreciate your help on this !!!! thanks you ... (8 Replies)
Discussion started by: nitinrp1
8 Replies

4. Shell Programming and Scripting

How to extract one part from whole output

Hi All, I am trying to write a small shell programming to get db2 database size info. The command I am going to use is- db2 "CALL GET_DBSIZE_INFO(?, ?, ?, -1)" and the output of above command generally is- Value of output parameters -------------------------- Parameter Name :... (4 Replies)
Discussion started by: NARESH1302
4 Replies

5. Shell Programming and Scripting

Any shell scripts for cutting and pasting part of data?

Hi, I have a tab-delimited txt file as below. It is part of the original file. I want to cut the lines starting with "3" in column1 and paste them before the lines starting with "1" in column 1. So I will get Anyone knows any simple shell scripts to do that? The original file is... (5 Replies)
Discussion started by: cliffyiu
5 Replies

6. Shell Programming and Scripting

combining cat output and cutting rows

I have a file that contain the following. -D HTTPD_ROOT="/usr/local/apache" -D SERVER_CONFIG_FILE="conf/httpd.conf" I want a shell script, so that after cat filename and apply the shell script I should get the output as follows. /usr/local/apache/conf/httpd.conf ie cat filename |... (7 Replies)
Discussion started by: anilcliff
7 Replies

7. Shell Programming and Scripting

Cutting strings from output of command

Hi, I am new to scripting and need help in cutting strings from output of a command. For exapmle in am getting the following as the out out from the command i run: Out Condition: Askajdsdfa | date: 1204 | oper: + I need to get the output as Askajdsdfa and 1204. Thanks (3 Replies)
Discussion started by: hraj1984
3 Replies

8. Shell Programming and Scripting

Cutting a part of line till delimiter

here are the few scenarios... isoSizeKB text NOT NULL, reserved1 varchar(255), KEY `deviceId` (`deviceId`) `d5` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `dHead` enum('HistoryInfo','Diversion') COLLATE utf8_unicode_ci, `ePR` int(11) DEFAULT '0', PRIMARY KEY (`id`) ... (7 Replies)
Discussion started by: vivek d r
7 Replies

9. UNIX for Beginners Questions & Answers

Cutting disk space output

Running this code df -h | head -2 | awk '{print $8}' Gives me the following output: %iused 6% What I'm trying to do is get the 6% but I'm having trouble doing this using cut -c, I think that this could be because the text is on different lines; is there a way of doing this? (8 Replies)
Discussion started by: $shell_Learner
8 Replies

10. UNIX for Beginners Questions & Answers

Extract a part of grep output

Hi, On AIX 7 I have : grep 's_ohs_instance_loc' $CONTEXT_FILE <ohs_instance_loc oa_var="s_ohs_instance_loc">/u01/appl_top/env/fs1/FMW_Home/webtier/instances/EBS_web_env_OHS1</ohs_instance_loc> But I need only this part:... (4 Replies)
Discussion started by: big123456
4 Replies
LIST-DESKTOP-PROFILES(1)				      General Commands Manual					  LIST-DESKTOP-PROFILES(1)

NAME
list-desktop-profiles - list known profiles that meet given criteria SYNOPSIS
list-desktop-profiles [OPTION] DESCRIPTION
As the number of .listing files holding metadata grows, trying to find out which profiles are present/meet certain criteria becomes increasingly unpleasant. This script remedies that allowing you to just list your criteria, and outputting all profiles meeting those cri- teria. By default it will just output the lines from the .listing files for each (matching) profile, but you can specifying a formatstring to fancy up the output. OPTIONS
-n <regexp>, --name <regexp> Limit shown profiles to those for which the name (1st) field of the profile description needs matches the given regular expression. -k <regexp>, --kind <regexp> Limit shown profiles to those for which the kind (2nd) field of the profile description needs matches the given regular expression. -l <regexp>, --location <regexp> Limit shown profiles to those for which the location (3th) field of the profile description needs matches the given regular expres- sion. -p <comparison>, --precedence <comparison> Limit shown profiles to those for which the precedence (4th) field of the profile description succeeds the given comparison. In the comparison you can Use 'gt' for 'greater then', 'lt' for 'less then', 'ge' for 'greater then or equal to', 'le' for 'less then or equal to', 'eq' for 'equal to', and 'ne' for 'not equal to'. (NOTE: empty precedence-field, is lowest possible precedence) -r <regexp>, --requirement <regexp> Limit shown profiles to those for which the requirements (5th) field of the profile description needs matches the given regular expression. -c <regexp>, --comment <regexp>, --description <regexp> Limit shown profiles to those for which the comment (6th) field of the profile description needs matches the given regular expres- sion. -u <username>, --user <username> Limit shown profiles to those for which the given user meets the requirements. (NOTE: doesn't always give correct results! Results might be wrong when using shell command requirements that depend on the users environment. Or when 'group $USER' gives a different result as 'group' executed as $USER, which can happen when adding groups through pam_group). -d <dir>, --directory <dir> Also use .listing files found in the given directory. This option can be used multiple times to add more then 1 additional directory -e <formatstring>, --entry-format <formatstring> Show profile information according to the specified format spring (instead of just echoing the profile-line). The format string may use the following variables: NAME, LOCATION, PRECEDENCE, REQUIREMENTS, KIND, DESCRIPTION, FILE; the first 6 of these refer to the corresponding field, the last refers to the .listing file the profile is in. (e.g. '$FILE_$NAME - $DESCRIPTION'). Any characters that are interpreted specially by the shell should be escaped. -s <fieldname>|<fieldnumber>, --sort-key <fieldname>|fieldnumber Sort output on the requested field (fieldname is one of name, kind, location, precedence, requirements, or description; fieldnumbers run from 1-6). EXAMPLES
list-desktop-profiles -k KDE -s precedence -u user1 List all kde-profiles that will be activated for user1 in order of precedence. list-desktop-profiles -k 'KDE|GCONF' List all kde and gnome profiles. list-desktop-profiles -p 'gt 50' List all profiles with a precedence value greater then 50. ENVIRONMENT
NAME_FILTER, LOCATION_FILTER, PRECEDENCE_FILTER, REQUIREMENT_FILTER, KIND_FILTER, DESCRIPTION_FILTER Can be used to specify the default regular expressions and comparisons. Default to empty. OUR_USER Set the user for which the requirements need to be met. Defaults to unset. EXTRA_LISTINGS Can be used to specify a (space separated) list of extra .listing files to include. Defaults to empty FORMAT Can be used to specify the default format string. By default it will output the profile-line from the .listing file. SORT_KEY Can be used to specify the default sort-key (= field number). Defaults to 1 FILES
/etc/desktop-profiles/*.listing - Files containing the metadata about installed profiles /etc/default/desktop-profiles - File containing default settings for this script (by way of the environment variables above) BUGS
The '-u <username>' is not guaranteed to work correctly for shell command requirements. Particulary this will give incorrect results if the shell command depends on some state of the user environment. AUTHOR
This manual page was written by Bart Cornelis <cobaco@skolelinux.no>. SEE ALSO
desktop-profiles(7), update-profile-cache(1), profiles-manager(1) desktop-profiles November 11, 2004 LIST-DESKTOP-PROFILES(1)
All times are GMT -4. The time now is 06:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy