i have a file that contains 288 lines and I need to parse the data and grab various fields, (which is no problem), however I also need to add to the beginning of each line the line number with preceding zeros, (up to 4 characters) at the front of the line number.
EX...
Here's what I have so far...
awk '{a[NR]=$1}END{print a[NR]}' INPUTFILE
But this only prints the last element...
which in the above example would be "ccc"
Hi all - -
I want to load an array, to be used later for a system command, with the first field in a multi-line file. The input file will have anywhere from 2 to 150 lines, give or take a few lines...
EX:
aaa 111 222 333
bbb 123 123 123
ccc 345 345 345
.
.
and have the value of the array...
I have a question for the Gurus...
I have a need to link one directory to several others.
EX.
DIR1 --> dira, dirb, dirc, etc...
Is there a way to do this within AIX???
Actually the requirments have changed... now I need to search the file for a variable (which can be class1 or class2 or class3, so on... ) and print the paragraph to a file that will be used for report generation...
When users create an expense report (pdf format) in SAP and attempt to download them, vi http and eventually Adobe, they get a list of the expense reports that exist, (I've verified their existance on the applicaiton server) when the user selects a report to print they get an error stating...
does anyone know what permissions need to be set for X-Windows to work. I have a lpar running AIX53TL04 with all the X11 filesets installed and I can only get the root user to work with Xwindows. Any non-root user can not access the lpar. I get a login screen and when I enter the correct...
I have an input file:
1) host1
2) host2
3) host3
4) hosta
5) hostb
6) hostc
so on and so forth. I want to treat "1) host1" as a variable, however I've tried several combinations and can only get variables assigned as "1)" and "host1". Any help would be appreciated.
I have an environment that consists of over 75 lpars and standalone servers. I have over 2100 users to manage across the entire enterprise. I need to keep UIDs and GIDs syncd to prevent duplicate UID and GIDs. Does anyone have any suggestions as to how to accomplish this. Also, passwords are...
p5wizard,
thanks for the response, however I'm not sure I understand the loop. It looks like you are setting the $file variable to the output from the ls command. where are $1-$3 being set?
I have about 70 files to merge into one, each file has about 7 lines or so of data. The final format has to be:
DATA FROM FILE1 DATA FROM FILE2 DATA FROM FILE3
DATA FROM FILE1 DATA FROM FILE2 DATA FROM FILE3
DATA FROM FILE1 DATA FROM FILE2 DATA FROM FILE3
DATA FROM FILE1 DATA FROM FILE2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.