Sponsored Content
Full Discussion: unix Shell scripting
Top Forums Programming unix Shell scripting Post 302991239 by yadavricky on Wednesday 8th of February 2017 08:11:43 AM
Old 02-08-2017
unix Shell scripting

Hi All,

need help to complete the automation but stuck at a perticular situation

below is the code

<code>
Code:
fixed_function_name
{
code....
code....

variable_map=
{
a="/a"
b="/b"
c="/c" 
so on...

}

}

now i want to read any random entry from csv against variable_map in that fixed_function_name and insert d="/d"
inside {} but after c="/c" ( it can be anything as the file gets updated in future)



second logic


Code:
insert_RIK
{
values[nik,pik,iik,dik]
}


i have fixed word RIK

which i need to insert automatically by searching the frame insert_RIK

the value RIK should be inserted at the end of line values[....,dik, RIK]

please guide.


.csv file entries
Code:
variable_map, d="/d"
values, RIK

Sent from my MotoG3 using Tapatalk

Last edited by jim mcnamara; 02-08-2017 at 09:17 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix shell scripting

I need to write a script which analyses an invoice file, counting the amount of pages in the file to be printed per account number and per invoice. The account numbers are stored in another file which has instructions on what do with ach customers invoice as per their account number. please... (6 Replies)
Discussion started by: la_burton
6 Replies

2. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

3. Shell Programming and Scripting

Unix shell scripting

Hi, we are writing this fields dynamically retrieved from database and writing into the file. $bmpRec = $bmpRec.'|'.$cust_id; # sp4 $bmpRec = $bmpRec.'|'.$serv_id; # sp5 $bmpRec = $bmpRec.'|'.$site_id; # sp6 $bmpRec = $bmpRec.'|'.$loc_id; # sp7 ... (4 Replies)
Discussion started by: Maruthi Kunnuru
4 Replies

4. Shell Programming and Scripting

Unix Shell Scripting

Hi All, Greetings!! I am trying to write a script that will get me the syslog.log file output of last week... That is ...my cron will run on Monday and will get me the syslog output of previous week , last monday-last sunday. I tried using date formatting and tail..but did not succeed.... (4 Replies)
Discussion started by: premamadhuri
4 Replies

5. UNIX for Advanced & Expert Users

Need your Help on Unix Shell Scripting.........

Hi Friends, 1. Bash Shell Scrpt to take backup at evening 2. I need a bash shell script for killing all processes. (5 Replies)
Discussion started by: vinayraj
5 Replies

6. Shell Programming and Scripting

Unix Shell Scripting

I 'm new to unix shell scripting can some one guide me to any e-book or link from where i can learn unix shell scripting .. i want to learn create interactive scripts for my day to day solaris work. Any help would be appreciated (1 Reply)
Discussion started by: fugitive
1 Replies

7. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies

8. UNIX for Dummies Questions & Answers

Unix Shell Scripting

I'm sorry if this doesn't go here, but I'm in depserate need of help with my last unix homework. Anyways, I'm taking summer classes, and one of them is UNIX. I've understood everything thus far, but I'm having a killer time with how my instructor has worded the problems for shell scripting. I... (3 Replies)
Discussion started by: dw15
3 Replies

9. Shell Programming and Scripting

UNIX shell scripting

I am new to Unix.. Can someone please help me to understand the concept of Login shell and non login shell ? what exactly the difference between them :confused: (1 Reply)
Discussion started by: lokita jain
1 Replies

10. UNIX for Beginners Questions & Answers

UNIX Shell Scripting

Describe in short the word completion feature of the tcsh Completion works anywhere in the command line, not at just the end, for both commands and filenames. Type part of a word and hit the Tab key, and the shell replaces the incomplete word with the complete one in the input buffer. The... (1 Reply)
Discussion started by: Elena Lauren
1 Replies
fruadm(1M)						  System Administration Commands						fruadm(1M)

NAME
fruadm - prints and updates customer data associated with FRUs SYNOPSIS
/usr/platform/sun4u/sbin/fruadm /usr/platform/sun4u/sbin/fruadm -l /usr/platform/sun4u/sbin/fruadm [-r] path [text] DESCRIPTION
fruadm prints or sets the customer data for Field-Replaceable Units (FRUs). Without arguments, fruadm prints the paths of all FRU ID-capable FRUs (containers) in the system, along with the contents of the customer data record, if present, for each such FRU; for FRUs without customer data, fruadm prints only the container's path. Only a privileged user can create or update data in containers. The privileges required to perform these write operations are hardware dependent. Typically, a default system configuration restricts write operations to the superuser or to the platform-administrator user. OPTIONS
The following options are supported: -l List the system's frutree paths. -r Recursively display or update the data for all containers rooted at the argument path. OPERANDS
The following operands are supported: path A full or partial system frutree path for or under which to print or set the customer data. The first field of each line of output of fruadm -l gives the valid full frutree paths for the system. Paths can include shell meta-characters; such paths should be quoted appropriately for the user's shell. For par- tial paths, the first matching full path is selected for display or update. Without the -r option, the path must be that of a container; with the -r option, all containers (if any) under path will be selected. text Up to 80 characters of text set as the customer data. If the text contains white space or shell metacharacters, it should be quoted appropriately for the user's shell. EXAMPLES
Example 1: Displaying All Customer Data The following example prints all customer data available from FRUs on the system. For containers with no customer data, only the contain- ers' paths will be listed. example% fruadm Example 2: Displaying Customer Data For a Single FRU The following command prints the customer data, if present, for the specified FRU: example% fruadm /frutree/chassis/system-board Example 3: Displaying Customer Data For a Single FRU The following command prints the customer data, if present, for the first mem-module found: example% fruadm mem-module Example 4: Setting Customer Data The following example sets the customer data for a FRU: example# fruadm system-board 'Asset Tag 123456' Example 5: Setting Customer Data The following command sets the customer data for all FRUs under chassis: example# fruadm -r /frutree/chassis "Property of XYZ, Inc." EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWfruip.u | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
prtfru(1M), attributes(5) SunOS 5.10 22 Feb 2002 fruadm(1M)
All times are GMT -4. The time now is 06:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy